Ets Iot
Ets Iot
NO
O
1. LED BLINKING USING ETS IOT KIT 2
2. PUSH BUTTON BASED LED CONTROL USING ETS IOT KIT 6
3. PUSH BUTTON BASED BUZZER CONTROL USING ETS IOT KIT 10
4. OLED DISPLAY CONFIGURATION USING ETS IOT KIT 14
5. MONITORING TEMPERATURE, PRESSURE & HUMIDITY OF 18
ENVIRONMENT USING BME280 SENSOR, THINGSPEAK CLOUD &
ETS IOT KIT AND DISPLAY IT IN OLED DISPLAY
6. MONITORING ACC, GYR USING BMI160 SENSOR, THINGSPEAK 22
CLOUD & ETS IOT KIT AND DISPLAY IT IN OLED DISPLAY
7. CONTROL RELAY OF ETS IOT KIT USING TINGSPEAK COLUD 26
8. MONITORING THREE AXIS ACCELEROMETER SENSOR DATA
USING THINGSPEAK CLOUD & ETS IOT KIT
9. MONITORING LM35 TEMPERATURE SENSOR DATA USING 34
THINGSPEAK CLOUD & ETS IOT KIT
10. INTERFACING RF TRANSMITTER AND RECEIVER IN ETS IOT KIT 38
11. MONITORING LIGHT DEPENDENT RESISTOR DATA USING 42
THINGSPEAK & ETS IOT KIT
12. MONITORING DISTANCE OF AN OBJECT USING ULTRASONIC 50
SENSOR, THINGSPEAK & ETS IOT KIT
13. CONTROL ROTATION OF 180 DEGREE SERVO MOTOR USING 54
THINGSPEAK & ETS IOT KIT
14. CONTROL ROTATION OF 360 DEGREE SERVO MOTOR USING 58
THINGSPEAK & ETS IOT KIT
15. INTERFACE GPS MODULE AND PRINT LATITUDE LONGITUDE IN 62
OLED DISPLAY OF ETS IOT KIT
16. INTERFACING INERTIAL MEASUREMENT UNIT WITH ETS IOT KIT 66
AND SEND DATA TO THINGSPEAK CLOUD
17. INTERFACING HALL SENSOR WITH ETS IOT KIT AND SEND DATA 72
TO THINGSPEAK CLOUD
18. INTERFACING DIGITAL GYROSCOPE UNIT WITH ETS IOT KIT AND 76
SEND DATA TO THINGSPEAK CLOUD
19. INTERFACING LiDAR WITH ETS IOT KIT AND SEND DATA TO 80
THINGSPEAK CLOUD
20. DISPLAY ULTRASONIC SENSOR DATA BY INTERFACING LCD 84
DISPLAY WITH STM32 DEVELOPMENT BOARD USING ARDUINO
IDE
21. INTERFACING COLOR DISPLAY WITH ESP8266 DEVELOPMENT 88
BOARD USING ARDUINO IDE
22. INTERFACING MICRO SD CARD MODULE WITH ESP8266 98
DEVELOPMENT BOARD USING ARDUINO IDE
0|Page
1|Page
LED BLINKING USING ETS IOT KIT
Aim:
This project is used to blink the RGB LEDs in the ETS IoT Trainer kit
Components Required:
RGB LED:
Procedure:
Here we are working with the RGB LEDs that are varying with different types of the
colours in the with the combination of red, green and blue
In this use the annexure I for how to run the python code for blink the LEDs
In the blink below given program used to blink the LED 1 as RED, LED 2 as Green
and LED 3 as Blue
2|Page
Connection Diagram:
#mcp IC configuration
mcp = Adafruit_MCP230XX(busnum = 1, address = 0x20, num_gpios = 16) # MCP23017
3|Page
mcp.config(5, mcp.OUTPUT)
mcp.config(6, mcp.OUTPUT)
mcp.config(7, mcp.OUTPUT)
mcp.config(8, mcp.OUTPUT)
try:
while True:
#RGB LED blink
mcp.output(0, 1)
mcp.output(4, 1)
mcp.output(8, 1)
time.sleep(1)
mcp.output(0, 0)
mcp.output(4, 0)
mcp.output(8, 0)
time.sleep(1)
except KeyboardInterrupt:
#Ctrl+C and stop the program
mcp.output(0, 0)
mcp.output(1, 0)
mcp.output(2, 0)
mcp.output(3, 0)
mcp.output(4, 0)
mcp.output(5, 0)
mcp.output(6, 0)
mcp.output(7, 0)
mcp.output(8, 0)
Result:
4|Page
PUSH BUTTON BASED LED CONTROL USING ETS IOT KIT
Aim:
In this project the is study about control the RGB LEDs by pressing the Pushbutton
Components Required:
ETS IoT Trainer Kit
Power adaptor
Monitor
HDMI to VGI converter
Mouse and Keyboard
Switch:
Push-Buttons are normally-open tactile switches.
Push buttons allow us to power the circuit or make any particular connection only
when we press the button.
Simply, it makes the circuit connected when pressed and breaks when released.
A push button is also used for triggering of the SCR by gate terminal
ETS IoT KIT has 2 PUSH BUTTON which has been connected to raspberry pi
through MCP23017.
5|Page
Fig : Push button Board connection
Program:
Procedure:
Here we used the push button to ON and OFF the LEDs in the ETS IoT Kit
In the below program if we press the Switch 1 all the three RGB LEDs as glow in that
LED 1 as RED , LED 2 as GREEN and LED 3 as BLUE
All the LEDs and switch are connected in the I2C manner with help of the MCP23017
IC
Refer the Annexure I how to run the python code in the ETS IoT Kit
Connection Diagram:
6|Page
mcp = Adafruit_MCP230XX(busnum = 1, address = 0x20, num_gpios = 16) # MCP23017
while (True):
print "Pin 9 = %d" % (mcp.input(9))
print "Pin 10 = %d" % (mcp.input(10))
pin9=mcp.input(9)
pin10=mcp.input(10)
#time.sleep(2)
if (pin9==0):
mcp.output(0,1)
elif (pin10==0):
mcp.output(4,1)
else:
mcp.output(0,0)
mcp.output(4,0)
Result:
7|Page
PUSH BUTTON BASED BUZZER CONTROL USING ETS IOT
KIT
Aim:
This project is study about the control the Buzzer on and off using the push button
Components Required:
ETS IoT Trainer Kit
Power adaptor
Monitor
HDMI to VGI converter
Mouse and Keyboard
Buzzer:
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric (piezo for short).
Buzzer is a kind of voice device that converts audio model into sound signal. It is
mainly used to prompt or alarm
It is widely used in household appliances, alarm system, automatic production line,
low-voltage electrical equipment, electronic toys, game machines and other products
and industries
8|Page
Connection Diagram:
import sys
sys.path.append('/home/pi/Adafruit-Raspberry-Pi-Python-Code-legacy/Adafruit_MCP230xx')
while (True):
print "Pin 10 = %d" % (mcp.input(10))
pin10=mcp.input(10)
#time.sleep(2)
if (pin10==0):
mcp.output(11,1)
else:
mcp.output(11,0)
Result:
Components Required:
ETS IoT Trainer Kit
Power adaptor
Monitor
HDMI to VGI converter
Mouse and Keyboard
OLED Display:
The acronym 'OLED' stands for Organic Light-Emitting Diode - a technology that
uses LEDs in which the light is produced by organic molecules.
These organic LEDs are used to create what are considered to be the world's best
display panels.
Besides the noted advantages of OLED display, some of the disadvantages include:
Shorter lifetime then some other display technologies.
This shorter lifetime is mainly due to the blue organic material but lifetime gets better
all the time but is also due to moisture migration
Poor sunlight readability
10 | P a g e
Program:
import sys
sys.path.append('/home/pi/Adafruit-Raspberry-Pi-Python-Code-legacy/BME280')
import BME280 as BME
import time
import Adafruit_SSD1306
# Note you can change the I2C address by passing an i2c_address parameter like:
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, i2c_address=0x3C)
# Initialize library.
disp.begin()
ImageDraw
# Clear display.
disp.clear()
disp.display()
11 | P a g e
top = padding
# Move left to right keeping track of the current x position for drawing shapes.
x = padding
#Alternatively load a TTF font. Make sure the .ttf font file is in the same directory as the
python script!
#Some other nice fonts to try: http://www.dafont.com/bitmap.php
#font = ImageFont.truetype('Minecraftia.ttf', 8)
temperature,pressure,humidity = BME.readBME280All()
#Write two lines of text.
draw.text((x, top), "Temperature: "+str(temperature), font=font, fill=1)
draw.text((x, top+20), "Pressure: "+str(pressure), font=font, fill=1)
draw.text((x, top+40), "Humidity: "+str(humidity), font=font, fill=1)
#Display image.
disp.image(image)
disp.display()
time.sleep(5)
Procedure:
The experiment is used to work with the OLED Display in the ETS IoT Kit
The OLED display is connected in the I2C manner to the Raspberry pi
The OLED displays the temperature, humidity and pressure of the room with the help
of the BME 280 sensor is connected in the ETS IoT Kit
We will study about the BME 280 about the following experiment
Refer the Annexure I for how to run the below python program in the ETS IoT kit
Result:
12 | P a g e
Aim:
This project is used to monitor the temperature, humidity and pressure in OLE display
screen as well as ThingSpeak cloud platform
Components Required:
BME 280:
The BME280 is a humidity sensor especially developed for mobile applications and
wearables where size and low power consumption are key design parameters.
The unit combines high linearity and high accuracy sensors and is perfectly feasible
for low current consumption, long-term stability and high EMC robustness.
This precision sensor can measure relative humidity from 0 to 100% with ±3%
accuracy, barometric pressure from 300Pa to 1100 hPa with ±1 hPa absolute
accuracy, and temperature from -40°C to 85°C with ±1.0°C accuracy.
The BME280 sensor module reads barometric pressure, temperature, and humidity.
Because pressure changes with altitude, you can also estimate altitude.
The BME280 sensor uses I2C or SPI communication protocol to exchange data with a
microcontroller.
Connection Diagram:
13 | P a g e
Fig : BME280 sensor connection with Raspberry Pi
Program
import sys
sys.path.append('/home/pi/Adafruit-Raspberry-Pi-Python-Code-legacy/BME280')
import BME280 as BME
import time
import Adafruit_SSD1306
14 | P a g e
# Raspberry Pi pin configuration:
RST = 24
# Note you can change the I2C address by passing an i2c_address parameter like:
disp = Adafruit_SSD1306.SSD1306_128_64(rst=RST, i2c_address=0x3C)
# Initialize library.
disp.begin()
ImageDraw
# Clear display.
disp.clear()
disp.display()
# Move left to right keeping track of the current x position for drawing shapes.
x = padding
#Alternatively load a TTF font. Make sure the .ttf font file is in the same directory as the
python script!
15 | P a g e
#Some other nice fonts to try: http://www.dafont.com/bitmap.php
#font = ImageFont.truetype('Minecraftia.ttf', 8)
temperature,pressure,humidity = BME.readBME280All()
#Write two lines of text.
draw.text((x, top), "Temperature: "+str(temperature), font=font, fill=1)
draw.text((x, top+20), "Pressure: "+str(pressure), font=font, fill=1)
draw.text((x, top+40), "Humidity: "+str(humidity), font=font, fill=1)
#Display image.
disp.image(image)
disp.display()
time.sleep(5)
Procedure:
Here we are working with the BME280 that will give the Temperature, Humidity and
Pressure of the atmosphere
And also monitor the temperature, humidity and pressure in the atmosphere in the
OLED display present in the ETS IoT Kit and also analyse the variation occur in the
atmosphere with the ThingSpeak Cloud platform
The above connection diagram how the BME 280 sensor is connected with the
Raspberry pi present in the ETS IoT Kit
Refer the Annexure I for how to run the python program in the ETS IoT Kit
Result:
BMI 160:
BMI160 is small, low-power, low noise IMU (Inertial measurement unit) which used
for measurement of acceleration and angular rate.
It can be interfaced using I2C and SPI.
The accelerometer and gyroscope of BMI160 both have 16-bit digital resolution.
It has user selectable acceleration measurement range of ±2g/±4g/±8g/±16g.
It also has user selectable angular rate measurement range of
±125/±250/±500/±1000/±2000 dps (Degrees per second).
It has a built-in temperature sensor which can use for a temperature range of -40 0C
and +85 0C.
It operates on supply voltage range of 1.71 V to 3.6 V.
Its targeted device such as mobile phone and tablets, wearable devices, toys.
It is used in the application such as augmented reality and immersive gaming, indoor
navigation, step-counting, 6-axis and 9 axis sensor fusion, OSI (Optical image
stabilization) etc.
Connection Diagram:
17 | P a g e
Fig : BMI160 connection with Raspberry Pi
Program
import sys
sys.path.append('/home/pi/Adafruit-Raspberry-Pi-Python-Code-legacy/BMI160')
import BMI160 as BMI
import time
while True:
# read sensor value
Ax,Ay,Az = BMI.ReadSensor()
print "ACC X",Ax
print "ACC Y",Ay
print "ACC Z",Az
print"\n"
Gx,Gy,Gz = BMI.Read1Sensor()
print "GCC X",Gx
print "GCC Y",Gy
print "GCC Z",Gz
print"\n"
time.sleep(1)
Procedure:
The experiment is used to study about the Acceleration and Gyroscopic value with the
help of the BMI 160
Here we monitor the Acceleration and Gyroscopic of the particular place and also
monitor and view the values in the OLED display present in the ETS IoT Kit and also
analyse the acceleration and gyroscopic changes in the ThingSpeak Cloud
Refer Annexure I for how to run the below code in the ETS IoT Kit
Result:
18 | P a g e
CONTROL RELAY OF ETS IOT KIT USING TINGSPEAK
COLUD
Aim:
In this project used to control the relay using ThingSpeak cloud Platform
Components Required:
ETS IoT Trainer Kit
Power adaptor
Monitor
HDMI to VGI converter
Mouse and Keyboard
Relay:
Relay is also a switch that connects or disconnects two circuits.
But instead of manual operation a relay is applied with electrical signal, which in turn
connects or disconnects another circuit.
Relays can be of different types like electromechanical, solid state. Electromechanical
relays are frequently used
It consists of a set of input terminals for a single or multiple control signals, and a set
of operating contact terminals.
The switch may have any number of contacts in multiple contact forms, such as make
contacts, break contacts, or combinations
They are also used as automatic change over. Microprocessors use relays to control a
heavy electrical load.
Overload relays are used for protection of motor from overload & electrical failure
19 | P a g e
Connection Diagram:
20 | P a g e
while True:
conn = urllib.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json?
api_key=%s" \% (CHANNEL_ID,READ_API_KEY))
response = conn.read()
Procedure:
Here we used to control the relays present in the ETS IoT Kit by the ThingSpeak
Cloud
In the ETS IoT Kit has the Three 12V Relays they are internally connected with the
Raspberry Pi present in the ETS IoT Kit
The relays controlled by the ThingSpeak Cloud sending the commands from cloud to
ON and OFF the Relay
If data send form the cloud is ‘1’the Relay one will be ON or if the data is ‘0’the relay
will be OFF
Refer the Annexure I for how to run the below program in the ETS IoT Kit
Result:
21 | P a g e
MONITORING THREE AXIS ACCELEROMETER SENSOR
DATA USING THINGSPEAK CLOUD & ETS IOT KIT
Aim:
This Project is used to determine the 3-axis accelerometer values, X,Y and Z axis to
detect the motion and acceleration sensor
Components Required:
ADXL345 SENSOR:
The ADXL345 digital 3-axis accelerometer module is used for motion and
acceleration sensing applications.
This module contains an on-board ADXL345 accelerometer with digital data output
formatted as 16-bit two’s complement and accessible through either an I2C or SPI
interface.
It measures static acceleration due to gravity as well as dynamic acceleration resulting
from motion or shock
It also supports flexible interrupt modes that can be mapped to either of its two
interrupt pins.
It has free-fall detection and tap detection functions, etc. It also detect the lack of
motion by comparing acceleration values to user-defined thresholds.
The ADXL345 features 4 sensitivity ranges from +/- 2G to +/- 16G. And it
supports output data rates ranging from 10Hz to 3200Hz.
Program:
22 | P a g e
import smbus
import time
import urllib
time.sleep(0.5)
23 | P a g e
if yAccl > 511 :
yAccl -= 1024
Connection Diagram:
24 | P a g e
Fig : Connection Diagram
Pin mapping:
In this project we use thee external Three Axis sensor to determine and monitor the
acceleration and gyroscopic value in the ThingSpeak cloud
The external ADXL 345 sensor is connected with the ETS IoT kit to determine the
acceleration and gyroscopic value and monitor them inthe ThingSpeak cloud
Connect the ADXL 345 sensor with the ETS IoT kit as per in the above connection
diagram and pin mapping
Refer Annexure I for how to run the below program in the ETS IoT Kit.
Result:
25 | P a g e
MONITORING LM35 TEMPERATURE SENSOR DATA
USING THINGSPEAK CLOUD & ETS IOT KIT
Aim:
This Project is used to determine the Room temperature using the LM35 Temperature
sensor
Component Required:
LM35 Sensor:
26 | P a g e
Program:
spi = spidev.SpiDev()
spi.open(0,0)
def ReadChannel(channel):
adc = spi.xfer2([1,(8+channel)<<4,0])
data= ((adc[1]&3) << 8) + adc[2]
return data
def ConvertVolts(data,places):
volts = (data * 3.3) / float(1023)
volts = round(volts,places)
return volts
def ConvertTemp(data,places):
temp = ((data * 330)/float(1023))-5
temp = round(temp,places)
return temp
temp_channel = 0
delay = 3
while True:
temp_level = ReadChannel(temp_channel)
temp_volts = ConvertVolts(temp_level,2)
temp = ConvertTemp(temp_level,2)
print ("Temp : {} ({}V) {} deg C".format(temp_level,temp_volts,temp))
time.sleep(delay)
urllib.urlopen("https://api.thingspeak.com/update?api_key=JECTKF4RJR44LGVY&field1="
+str(temp))
time.sleep(5)
27 | P a g e
Connection Diagram:
Pin mapping:
5V VCC
A0 A0
GND GND
Procedure:
In this experiment we used to determine the atmospheric temperature with the help of
the LM 35 sensor and ETS IoT Kit
The LM 35 sensor has the three pin they are connected with the ETS IoT Kit asper the
above circuit diagram and pin mapping
And the sensor is connected to the Ets iot kit the sensor sense the temperature of the
atmosphere and gives the analog value to the ETS IoT kit
The received analog value is converted to the celsius and send the value to the
ThingSpeak Cloud
Refer Annexure I for how to sun the below program in the ETS IoT Kit
Result:
28 | P a g e
INTERFACING RF TRANSMITTER AND RECEIVER IN ETS
IOT KIT
Aim:
This project determines how the RF Transmitter and Receiver works with their
required frequency
Components Required:
RF module is a small electronic device used to transmit and receive radio signals
between two devices
It operates at 315Mhz.
They can easily fit into a breadboard and work well with microcontrollers to create a
very simple wireless Receiving frequency (MHz)ss data link.
These are only transmitters, they will only work communicating data one-way, you
would need two pairs (of different frequencies) to act as a transmitter/receiver pair.
This Radio Transmitter & Receiver pair is perfectly matched to allow you to control
items from a distance up to 500 feet wirelessly
Both the transmitter and receiver are in tune to the same Radio Frequency so that
when the transmitter emits a signal, the receiver will hear it wirelessly
29 | P a g e
Program:
import time
import sys
import RPi.GPIO as GPIO
a_on = '1111111111111010101011101'
a_off = '1111111111111010101010111'
b_on = '1111111111101110101011101'
b_off = '1111111111101110101010111'
c_on = '1111111111101011101011101'
c_off = '1111111111101011101010111'
d_on = '1111111111101010111011101'
d_off = '1111111111101010111010111'
short_delay = 0.00045
long_delay = 0.00090
extended_delay = 0.0096
NUM_ATTEMPTS = 10
TRANSMIT_PIN = 18
def transmit_code(code):
##Transmit a chosen code string using the GPIO transmitter
GPIO.setmode(GPIO.BOARD)
GPIO.setup(TRANSMIT_PIN, GPIO.OUT)
for t in range(NUM_ATTEMPTS):
for i in code:
if i == '1':
GPIO.output(TRANSMIT_PIN, 1)
time.sleep(short_delay)
GPIO.output(TRANSMIT_PIN, 0)
time.sleep(long_delay)
elif i == '0':
GPIO.output(TRANSMIT_PIN, 1)
time.sleep(long_delay)
GPIO.output(TRANSMIT_PIN, 0)
time.sleep(short_delay)
30 | P a g e
Fig : RF Transmitter
Connection Diagram:
31 | P a g e
RF Receiver Module Working and Procedure:
The simplest type of radio receiver, called a tuned radio frequency (TRF) receiver,
Mixture of radio signals from the antenna is filtered to extract the signal of the
desired transmitter
Oscillating voltage is sent through a radio frequency (RF)
The received signal is demodulated with the required demodulation technique like
AM demodulation, FM demodulation, PM demodulation
Connection Diagram:
32 | P a g e
Program:
if __name__ == '__main__':
GPIO.setmode(GPIO.BCM)
GPIO.setup(RECEIVE_PIN, GPIO.IN)
cumulative_time = 0
beginning_time = datetime.now()
print '**Started recording**'
while cumulative_time < MAX_DURATION:
time_delta = datetime.now() - beginning_time
RECEIVED_SIGNAL[0].append(time_delta)
RECEIVED_SIGNAL[1].append(GPIO.input(RECEIVE_PIN))
cumulative_time = time_delta.seconds
print '**Ended recording**'
print len(RECEIVED_SIGNAL[0]), 'samples recorded'
GPIO.cleanup()
Pin Mapping:
3.3V VCC
RPI 11 DATA
GND GND
Procedure:
In the receiver side the received encoded data collected from the transmitter is
decoded
The decoded data is displayed in the python shell
The connection is given as per the above connection diagram and pin mapping
Refer Annexure I for how to run the below program in ETS IoT Kit
33 | P a g e
Result:
34 | P a g e
MONITORING LIGHT DEPENDENT RESISTOR DATA
USING THINGSPEAK & ETS IOT KIT
Aim:
This Project is used to determine the varying the resistance with the help of light by
using the Light Dependent Resistor
Components Required:
Fig: LDR
35 | P a g e
Connection Diagram:
Pin Mapping:
36 | P a g e
GND GND
Program:
import time
import Adafruit_GPIO.SPI as SPI
import Adafruit_MCP3008
import urllib
CLK = 23
MISO = 21
MOSI = 19
CS = 24
mcp = Adafruit_MCP3008.MCP3008(clk=CLK, cs=CS, miso=MISO, mosi=MOSI)
SPI_PORT = 0
SPI_DEVICE = 0
mcp = Adafruit_MCP3008.MCP3008(spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE))
# Main program loop.
while True:
i=mcp.read_adc(0)
print "LDR Value:", i
urllib.urlopen("https://api.thingspeak.com/update?api_key=8NGROYPVG3A1X3JE
&field1="+str(i))
time.sleep(5)
Procedure:
In this we determine the Light dependence of the atmosphere with the help of the
LDR module and ETS IoT Kit
Here we measure the strength of the light with and various the resistance of the
module
We read the analog value from the LDR module and publish the data to the
ThingSpeak cloud to analyse the value light dependence in the room
Give the connection as per the above connection diagram and pin mapping
Refer Annexure I how to run the below program in the ETS IoT Kit
Result:
37 | P a g e
MONITORING DISTANCE OF AN OBJECT USING
ULTRASONIC SENSOR, THINGSPEAK & ETS IOT KIT
Aim:
This Project is used to measure the distance and also detection using ultrasonic sensor
Components Required:
Ultrasonic sensor:
Fig:Ultrasonic Sensor
38 | P a g e
Connection Diagram:
Pin mapping:
import time
import RPi.GPIO as GPIO
import urllib
39 | P a g e
GPIO.setup(GPIO_TRIGGER,GPIO.OUT) # Trigger
GPIO.setup(GPIO_ECHO,GPIO.IN) # Echo
while True:
# Send 10us pulse to trigger
GPIO.output(GPIO_TRIGGER, True)
time.sleep(0.00001)
GPIO.output(GPIO_TRIGGER, False)
while GPIO.input(GPIO_ECHO)==0:
start = time.time()
while GPIO.input(GPIO_ECHO)==1:
stop = time.time()
# That was the distance there and back so halve the value
distance = distance / 2
Procedure:
Here the ultrasonic sensor is used to measure the distance of the objects with help of
the ETS IoT kit
We send the distance read from the sensor is send to the ThingSpeak cloud
In the Ultrasonic sensor the Trig pin produces the ultrasonic wave and the waves are
reflected back to the sensor the Echo pin receives the reflected waves
The time difference between the transmission and the received ultrasonic waves
40 | P a g e
The calculated distance is send to the ThingSpeak cloud
Give the connection as per the above connection diagram and pin mapping
Refer Annexure I how to run the below program in the ETS IoT Kit
Result:
41 | P a g e
CONTROL ROTATION OF 180 DEGREE SERVO MOTOR
USING THINGSPEAK & ETS IOT KIT
Aim:
In this project rotation speed and angle of rotation of the servo motor can be
controlled
Components Required:
Servo Motor:
Servo motor are controlled by sending an electrical pulse of variable width, or pulse
width modulation (PWM), through the control wire
The desired position is sent via electrical pulses through the signal wire.
The motor's speed is proportional to the difference between its actual position and
desired position.
If the motor is near the desired position, it will turn slowly, otherwise it will turn fast
The servo motor is most commonly used for high technology devices in the industrial
application like automation technology.
It is a self-contained electrical device that rotate parts of a machine with high
efficiency and great precision.
The output shaft of this motor can be moved to a particular angle.
Servo motors are mainly used in home electronics, toys, cars, airplanes, etc
42 | P a g e
Connection Diagram:
Pin Mapping:
Program:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.OUT)
GPIO.setwarnings(False)
p = GPIO.PWM(12, 50)
p.start(7.5)
print "Servo Activated"
while True:
43 | P a g e
conn = urllib.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json?api_key=
%s" % (CHANNEL_ID,READ_API_KEY))
response = conn.read()
if response == '90':
p.ChangeDutyCycle(7.5) # turn towards 90 degree
time.sleep(1) # sleep 1 second
elif response == '180':
p.ChangeDutyCycle(12.5) # turn towards 180 degree
time.sleep(1) # sleep 1 second
p.stop()
Procedure:
Here we used the servor motor rotated in 180 degree with the help of the ETS IoT Kit
The received data is ‘90’ the servor motor rotates at 90 degree or if the data is ‘180;
the motor rotates at 180 degree
Give the connection as per the connection diagra and pin mapping
Refer Annexure I how to run the below code in the ETS IoT Kit
Result:
44 | P a g e
CONTROL ROTATION OF 360 DEGREE SERVO MOTOR
USING THINGSPEAK & ETS IOT KIT
Aim:
In this project rotation speed and angle of rotation of the servo motor can be
controlled
Components Required:
Servo Motor:
Servo motor are controlled by sending an electrical pulse of variable width, or pulse
width modulation (PWM), through the control wire
The desired position is sent via electrical pulses through the signal wire.
The motor's speed is proportional to the difference between its actual position and
desired position.
If the motor is near the desired position, it will turn slowly, otherwise it will turn fast
The servo motor is most commonly used for high technology devices in the industrial
application like automation technology.
It is a self-contained electrical device that rotate parts of a machine with high
efficiency and great precision.
The output shaft of this motor can be moved to a particular angle.
Servo motors are mainly used in home electronics, toys, cars, airplanes, etc
45 | P a g e
Connection Diagram:
Pin Mapping:
46 | P a g e
Program:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.OUT)
GPIO.setwarnings(False)
p = GPIO.PWM(12, 50)
p.start(7.5)
print "Servo Activated"
while True:
conn = urllib.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json?api_key=
%s" % (CHANNEL_ID,READ_API_KEY))
response = conn.read()
if response == '360':
p.ChangeDutyCycle(2.5) # turn towards 360 degree
time.sleep(1) # sleep 1 second
elif response == '180':
p.ChangeDutyCycle(12.5) # turn towards 180 degree
time.sleep(1) # sleep 1 second
elif response == '90':
p.ChangeDutyCycle(7.5) # turn towards 90 degree
time.sleep(1) # sleep 1 second
p.stop()
Procedure:
Here we used the servor motor rotated in 180 degree with the help of the ETS IoT Kit
The received data is ‘90’ the servor motor rotates at 90 degree or if the data is ‘180;
the motor rotates at 180 degree if the received value is 360 motor rotates at 360
degree
Give the connection as per the connection diagram and pin mapping
Refer Annexure I how to run the below code in the ETS IoT Kit
Result:
47 | P a g e
48 | P a g e
INTERFACE GPS MODULE AND PRINT LATITUDE
LONGITUDE IN OLED DISPLAY OF ETS IOT KIT
Aim:
This Project is used to get the latitude and longitude of the particular location with the
help of GPS Module
Components Required:
GPS Module:
49 | P a g e
Features:
50 | P a g e
Pin Mapping:
5V VCC
TX RX
RX TX
GND GND
Program:
import serial
import time
import string
import pynmea2
while True:
port="/dev/ttyS0"
ser=serial.Serial(port, baudrate=9600, timeout=0.5)
dataout =pynmea2.NMEAStreamReader()
newdata=ser.readline()
if newdata[0:6] == "$GPRMC":
newmsg=pynmea2.parse(newdata)
lat=newmsg.latitude
lng=newmsg.longitude
gps = "Latitude=" + str(lat) + " and Longitude=" +str(lng)
print(gps)
Procedure:
The GPS module is used to determine the latitude, longitude and altitude of the
landmark is determined
The analysed latitude, longitude and altitude are display in the OLED display present
in the ETS IoT Kit
Give the connection as per the connection diagram and pin mapping
Refer Annexure I how to run the below program in the ETS IoT Kit.
Refer Annexure IV for enable serial port.
Result:
51 | P a g e
INTERFACING INERTIAL MEASUREMENT UNIT WITH
ETS IOT KIT AND SEND DATA TO THINGSPEAK CLOUD
Aim:
In this project is learn about the how to interface the inertial measurement unit with
ETS IoT Kit and also send data to the ThingSpeak cloud
Components Required:
ETS IoT Trainer Kit
Inertial Measurement Unit Sensor (IMU)
Power Adaptor
HDMI to VGA Converter
Monitor
An IMU is a specific type of sensor that measures angular rate, force and sometimes
magnetic field
An inertial measurement unit (IMU) measures and reports raw or filtered angular rate
and specific force/acceleration experience by the object it is attached to.
Data outputs for an IMU are typically body-frame accelerations, angular rates and
(optionally) magnetic field measurements.
Once attached to an object, IMU sensors can provide information on the body’s
angular rate, orientation, and even force applied to it by measuring the linear and
angular motion using the combination of accelerometer, gyroscope, and
magnetometer.
They are used inside all modern smartphones, AR and VR headsets and any other
product that requires tracking in three-dimensional space.
52 | P a g e
Connection Diagram:
Pin Mapping:
53 | P a g e
ETS-IoT Kit GPS Module
3.3V VCC
SCL SCL
SDA SDA
GND GND
Program:
import FaBo9Axis_MPU9250
import time
import sys
import urllib
mpu9250= FaBo9Axis_MPU9250.MPU9250()
#import sys mpu9250 = FaBo9Axis_MPU9250.MPU9250()
while True:
accel = mpu9250.readAccel()
print " ax = " , ( accel['x'] )
print " ay = " , ( accel['y'] )
print " az = " , ( accel['z'] )
gyro = mpu9250.readGyro()
print " gx = " , ( gyro['x'] )
print " gy = " , ( gyro['y'] )
print " gz = " , ( gyro['z'] )
mag = mpu9250.readMagnet()
print " mx = " , ( mag['x'] )
print " mz = " , ( mag['z'] )
urllib.urlopen("https://api.thingspeak.com/update?
api_key=JECTKF4RJR44LGVY&field1=+str(accel['x'],accel['y'],accel[z'])&field2=+
str(gyro['x'],gyro['y'],gyro[z'])&field3=+str( mag['x'],mag['y'])")
time.sleep(5)
Procedure:
The inertial measurement unit module is used to determine the angular rate and
magnetic field
The read value is published to the ThingSpeak cloud
The IMU module connected to the ETS IoT Kit as refer the above connection diagram
and pin mapping
Refer Annexure I for how to run the below program in the ETS IoT Kit.
Refer Annexure V.
Result:
54 | P a g e
INTERFACING HALL SENSOR WITH ETS IOT KIT AND
SEND DATA TO THINGSPEAK CLOUD
Aim:
In this project learn about how interface the Digital Magnetometer unit with ETS IoT
kit
Components Required:
DIGITAL MAGNETOMETER:
The KY-024 Linear Magnetic Hall Effect Sensor Module and a digital interface, built-
in 13 LED build a simple circuit to produce a magnetic field warning lamp comes with
digital interfaces of the LED,
The linear Hall sensor magnetometer access number 3 interface, when linear Hall
magnetometer Sensor senses a key signal, LED lights, otherwise off.
Hall switch integrated circuit using hall effect principle, Uses the semiconductor
integrated technology manufacturing magnetic susceptibility of the circuit, it is by the
voltage regulator, hall voltage generator, differential amplifier, Schmitt triggers,
temperature compensation,
The open collector output stage circuit composed of magnetic sensitive sensor circuit,
its input for the magnetic induction intensity, the output is a digital voltage signal.
A magnetic field is detected by the sensor and will be printed as an analog voltage
value. You can control the sensitivity of the sensor with the potentiometer.
55 | P a g e
Fig :Hall sensor module
Connection Diagram:
Pin Mapping:
3.3V VCC
RPI 7 D0
GND GND
Program:
import RPi.GPIO as GPIO
import urllib
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setwarnings(False)
56 | P a g e
hallpin = 7
GPIO.setup( hallpin, GPIO.IN)
while True:
if(GPIO.input(hallpin) == False):
urllib.urlopen(“https://api.thingspeak.com/update?
api_key=JECTKF4RJR44LGVY&field1=+str(0)”)
print “magnetic field not detected”
else:
urllib.urlopen(“https://api.thingspeak.com/update?
api_key=JECTKF4RJR44LGVY&field1=+str(1)”)
print “magnetic field detected”
time.sleep(5)
Procedure:
The digital magnetometer to find the magnetic field detection in the electronic devices
In the digital magnetometer output of the module is 0 or 1
If the magnetic field is detected the magnetometer value is 1 and if not detected the
value is 0
The magnetic field is detected the value is send to the ThingSpeak cloud
Give connection as per the connection diagram and pin mapping
Refer Annexure I how to run the below program in the ETS IoT Kit
Result:
57 | P a g e
Aim:
In this project learn about how to interface Digital Gyroscope with ETS IoT Kit
Components Required:
Digital Gyroscope:
MPU6050 module uses the popular MPU6050 Sensor which includes both a 3 axis
accelerometer and a 3 axis gyroscope in a single package.
The sensor can be interfaced through a I2C connection which allows an easy and
direct interface between the sensor and a micro controller.
The MPU-6000/MPU-6050 family of parts are the world’s first and only 6-axis
Motion Tracking devices designed for the low power, low cost, and high performance
requirements of smartphones, tablets and wearable sensors.
The 6 Degree of Freedom sensor breakout integrate with the MPU6050 sensor and the
low noise 3.3v regulator and pull-up resistors for the I2C bus.
Digital I2C interface to read the output of the sensor
Selectable Solder Jumpers on CLK, FSYNC and AD0
Tri-Axis angular rate sensor (gyro) with a sensitivity up to 131 LSBs/dps and a full-
scale range of ±250, ±500, ±1000, and ±2000dps
Tri-Axis accelerometer with a programmable full scale range of ±2g, ±4g, ±8g and
±16g
Connection Diagram:
58 | P a g e
Fig : Circuit Diagram
Pin Mapping:
59 | P a g e
ETS-IoT Kit Magnetometer
3.3V VCC
SCL SCL
SDA SDA
GND GND
Program:
def MPU_Init():
#write to sample rate register
bus.write_byte_data(Device_Address, SMPLRT_DIV, 7)
def read_raw_data(addr):
60 | P a g e
#Accelero and Gyro value are 16-bit
high = bus.read_byte_data(Device_Address, addr)
low = bus.read_byte_data(Device_Address, addr+1)
MPU_Init()
while True:
#Full scale range +/- 250 degree/C as per sensitivity scale factor
Ax = acc_x/16384.0
Ay = acc_y/16384.0
Az = acc_z/16384.0
Gx = gyro_x/131.0
Gy = gyro_y/131.0
Gz = gyro_z/131.0
61 | P a g e
print (“Gx=%.2f” %Gx, u’\u00b0’+ “/s”, “\tGy=%.2f” %Gy, u’\u00b0’+
“/s”, “\tGz=%.2f” %Gz, u’\u00b0’+ “/s”, “\tAx=%.2f g” %Ax, “\tAy=%.2f g” %Ay,
“\tAz=%.2f g” %Az)
urllib.urlopen(“https://api.thingspeak.com/update?
api_key=JECTKF4RJR44LGVY&field1=+str(Ax,Ay,Az)&field2=+str(Gx,Gy,Gz)”)
sleep(1)
Procedure:
The digital gyroscope module is used to determine the gyroscopic and Accelerometer
values
The gyroscopic value and the Accelerometer is send to the ThingSpeak cloud
Give the connection ass per the above connection diagram and pin mapping
Refer Annexure I how to run the below program in the ETS IoT Kit
Result:
62 | P a g e
INTERFACING LiDAR WITH ETS IOT KIT AND SEND
DATA TO THINGSPEAK CLOUD
Aim:
In this project is used to learn about how to interface the LiDAR Distance sensor with
the ETS IoT Kit monitoring the value in the ThingSpeak Cloud
Components Required:
Program:
63 | P a g e
import serial,time
import numpy as np
import urllib
# TFLuna Lidar #
ser = serial.Serial(“/dev/serial0”, 115200,timeout=0) # mini UART serial device
if counter > 8:
bytes_serial = ser.read(9) # read 9 bytes
ser.reset_input_buffer() # reset buffer
while True:
if ser.isOpen() == False:
ser.open() # open serial port if not open
distance,strength,temperature = read_tfluna_data() # read values
print(‘Distance: {0:2.2f} m, Strength: {1:2.0f} / 65535 (16-bit), Chip Temperature:
{2:2.1f} C’.\ format(distance,strength,temperature)) # print sample data
ser.close() # close serial port
urllib.urlopen(“https://api.thingspeak.com/update?api_key=JECTKF4RJR44LGVY&
field1= +str(distance)&field2=+str(strength)&field3=+str(temperature))
time.sleep(5)
Connection Diagram:
64 | P a g e
Fig : Circuit Diagram
5V VCC Green
TX RX Yellow
RX TX Orange
65 | P a g e
GND GND Red
Program:
import serial
import urllib
def getTFminiData():
while True:
count = ser.in_waiting
if count > 8:
recv = ser.read(9)
ser.reset_input_buffer()
if recv[0] == ‘Y’ and recv[1] == ‘Y’: # 0x59 is ‘Y’
low = int(recv[2].encode(‘hex’), 16)
high = int(recv[3].encode(‘hex’), 16)
distance = low + high * 256
print(distance)
if __name__ == ‘__main__’:
try:
if ser.is_open == False:
ser.open()
getTFminiData()
except KeyboardInterrupt: # Ctrl+C
if ser != None:
ser.close()
Procedure:
In this we used to measure the distance, strength and temperature of the object with
the help of the LiDAR distance sensor
The LiDAR sensor is connected in the UART method to the ETS IoT Kit the
connection is given as per the below connection diagram
The below given python program is used to define the distance, strength and
temperature and publish them in the ThingSpeak cloud
Give the connection as the per the connection diagram
Refer the Annexure I for how to run the python code
Refer Annexure IV for enable serial port.
Result:
66 | P a g e
DISPLAY ULTRASONIC SENSOR DATA BY INTERFACING
LCD DISPLAY WITH STM32 DEVELOPMENT BOARD
USING ARDUINO IDE
Aim:
In this project how to use the STM 32 development board and how to interface the
LCD display with it
Components Required:
LCD Display
Ultrasonic Sensor
67 | P a g e
The board does not require any separate probe as it integrates the ST-LINK/V2-1
debugger and programmer.
The board comes with the STM32 comprehensive software HAL library together with
various packaged software examples, as well as direct access to mbed online
resources.
68 | P a g e
69 | P a g e
70 | P a g e
Programming STM32 Nucleo Board with Arduino IDE:
• The STM32 Development Board can be easily programmed with Arduino IDE since it
is easy to use.
• Programming STM32 with the Arduino IDE will hardly take 5-10 minutes. All you
need is the Arduino IDE, a USB cable and the STM32 Development board itself.
• Let us Set up the Arduino IDE for STM32 module and program it to blink a LED
light.
• Go to File -> Preferences to open the below dialog box. In the “Additional Board
managers URL” paste the below link as shown in the image. Then press OK
https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/
package_stm_index.json
71 | P a g e
• Now, go to Tool -> Boards -> Board Managers. Search for STM32 in search box the
STM32 boards are shown in the list and click on install as shown in the below image
72 | P a g e
LCD Display:
Program:
73 | P a g e
#include <LiquidCrystal.h>// includes the LiquidCrystal Library
// Creates an LCD object. Parameters: (rs, enable, d4, d5, d6, d7)
LiquidCrystal lcd(1, 2, 4, 5, 6, 7 );
void setup(){
// Initializes the interface to the LCD screen, and specifies the dimensions (width and height)
of the display
lcd.begin(16,2);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
voidloop(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distanceCm= duration*0.034/2;
distanceInch = duration*0.0133/2;
// Sets the location at which subsequent text written to the LCD will be displayed
lcd.setCursor(0,0);
lcd.print(“Distance: “);// Prints string “Distance” on the LCD
lcd.print(distanceCm);// Prints the distance value from the sensor
lcd.print(“ cm”);
delay(10);
lcd.setCursor(0,1);
lcd.print(“Distance: “);
lcd.print(distanceInch);
lcd.print(“ inch”);
delay(10);
}
74 | P a g e
Connection Diagram:
Pin Mapping:
5V VCC
D9 Echo
D10 Trig
GND GND
5V VDD, LED A
D1 RS
D2 Enable
D4 D4
D5 D5
D6 D6
D7 D7
GND VSS, RW, LED K
Procedure:
Give the connection as per the connection diagram
The distance is measured by the distance with help of the ultrasonic sensor
The measured distance is displayed in the LCD display
For this run the below coding in the arduino IDE for refer the above STM32 board
programming
75 | P a g e
76 | P a g e
INTERFACING COLOR DISPLAY WITH ESP8266
DEVELOPMENT BOARD USING ARDUINO IDE
Aim:
In this project is used to learn about the ESP8266 and how to interface the color
display with it and display the ultrasonic sensor value in the display
Components Required:
Color Display
Ultrasonic Sensor
USB cable
Connecting Wires
Program:
77 | P a g e
NodeMCU Development Board Pinout Configuration:
78 | P a g e
Programming NodeMCU ESP8266 with Arduino IDE:
• The NodeMCU Development Board can be easily programmed with Arduino IDE
since it is easy to use.
• Programming NodeMCU with the Arduino IDE will hardly take 5-10 minutes. All
you need is the Arduino IDE, a USB cable and the NodeMCU board itself.
• Let us Set up the Arduino IDE for ESP8266-1module and program it to blink a LED
light.
• Go to File -> Preferences to open the below dialog box. In the “Additional Board
managers URL” paste the below link as shown in the image. Then press OK
• http://arduino.esp8266.com/stable/package_esp8266com_index.json
79 | P a g e
• Now, go to Tool -> Boards -> Board Managers. Search for ESP8266 by esp8266
community and click on install as shown in the below image
• Now, go to Tools -> Boards -> NodeMCU. You should see the below screen.
80 | P a g e
Color Display:
This lovely little display breakout is the best way to add a small, colorful and bright
display to any project.
The 2.0 Inch SPI TFT LCD Color Screen Module display uses 4-wire SPI to
communicate and has its own pixel-addressable frame buffer
It can be used with every kind of microcontroller. Even a very small one with low
memory and few pins available
The 2.0 display has 176220 color pixels. Similar LCD displays, which are CSTN type
and thus have poor color and slow refresh,
This display is a true TFT! The TFT driver (ILI9225) can display full 18-bit color
(262,144 shades).
The LCD will always come with the same driver chip so there are no worries that
your code will not work from one to the other.
The breakout has the TFT display soldered on (it uses a delicate flex-circuit
connector) as well as an ultra-low-dropout 3.3V regulator and a 3/5V level shifter so
you can use it with 3.3V or 5V power and logic.
We also had a little space so we placed a micro SD card holder so you can easily load
full-color bitmaps from a FAT16/FAT32 formatted micro SD card.
81 | P a g e
Connection Diagram:
Pin Mapping:
3.3V VCC
D8 CS
D4 RST
D2 RS
D5 SCK
D7 MOSI/SDA
GND GND
82 | P a g e
Program
struct _point
{
int16_t x;
int16_t y;
};
83 | P a g e
TFT_22_ILI9225 tft = TFT_22_ILI9225(TFT_RST, TFT_RS, TFT_CS, TFT_LED,
TFT_BRIGHTNESS);
// Setup
void setup() {
tft.begin();
tft.clear();
}
// Loop
void loop() {
// Calculate the number of steps to rotate the triangle a full rotation
int16_t steps = (int16_t)(360 / ROTATE_ANGLE);
return o;
}
84 | P a g e
// Rotate triangle around point r
void rotateTriangle( _point &a, _point &b, _point &c, _point r, int16_t deg ) {
return r;
}
Procedure:
The distance is measured by the distance with help of the ultrasonic sensor
For this run the below coding in the Arduino IDE for refer the above ESP8266 board
programming
Refer Annexure VI
Result:
85 | P a g e
INTERFACING MICRO SD CARD MODULE WITH ESP8266 DEVELOPMENT
BOARD USING ARDUINO IDE
Aim:
In this project is used to learn about the ESP8266 and how to interface the SD card
with ESP8266 for writing and reading data.
Components Required:
USB cable
Connecting Wires
SD card
This Mini Micro SD Card Reader Module also called Micro SD Adaptor which is designed
for dual I/O voltages. The Module is a simple solution for transferring data to and from a
standard SD card. The pinout is directly compatible with Not only with Arduino but can also
be used with other microcontrollers development boards.
Micro SD Card Reader Module has an SPI interface which is compatible with any sd card
and it uses 3.3V power supply which is compatible with Arduino UNO/Mega.SD module has
various applications such as data logger, audio, video, graphics.
There are total of six pins (GND, VCC, MISO, MOSI, SCK, CS), GND to ground, VCC is
the power supply, MISO, MOSI, SCK is the SPI bus, CS is the chip select signal pin; 3.3V
regulator circuit: LDO regulator output 3.3V as level converter chip, Micro SD card supply.
86 | P a g e
Pin Diagram
Procedure
1. Insert the microSD card into your computer. Go to My Computer and right-click on
the SD card. Select Format as shown in the figure below.
2. A new window pops up. Select FAT32, press Start to initialize the formatting process
and follow the onscreen instructions.
4. For this run the below coding in the Arduino IDE for refer the above ESP8266 board
programming
Circuit Diagram
87 | P a g e
Program
#include <SPI.h>
#include <SD.h>
File myFile;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
Serial.print("Initializing SD card...");
if (!SD.begin(4)) {
Serial.println("initialization failed!");
return;
}
Serial.println("initialization done.");
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
myFile = SD.open("test.txt", FILE_WRITE);
88 | P a g e
} else {
// if the file didn't open, print an error:
Serial.println("error opening test.txt");
}
}
void loop() {
// nothing happens after setup
}
Result
89 | P a g e
ANNEXURE I
Step1: Go to Menu -> Programming -> Python 2.7 IDLE -> File -> New
Step3: Save & Run the program (Run -> Run Module)
ANNEXURE II
ANNEXURE III
ADXL 345
ANNEXURE IV
Serial Port Enable
90 | P a g e
Step 1 : Enable Serial Port
>>>sudo nano /boot/config.txt
Step 2 : Scroll to the Bottom of the Boot File and Add ‘enable_uart=1’
>>> sudo reboot
Step 3 : Verify Enabled mini UART with /dev/serial0 -> ttyS0, enter the following command
>>>ls –l /dev/serial
Step 4 : >>>python –m pip install pyserial
ANNEXURE V
Inertial Measurement
Open terminal
ANNEXURE VI
Step 1 : go to the link : https://github.com/Nkawu/TFT_22_ILI9225
Step 2 : Install the library
Step 3: Open examples and select the program
Step 4: Make connections
Step 5: Run the program
ANNEXURE VII
91 | P a g e