![]() Step 2): Place the LEDs on the breadboard and connect their catodes to ground connect their anodes to Digital Pins through a 220 Ohm resistor each: Yellow to Pin 3, Green to Pin 4 and Red to Pin 5. ![]() Step 1): Connect Ground and 5V from Arduino to breadboard. Since the Bluetooth module in all smartphones is of Master type, the one we need for Arduino must be a Slave (this has nothing to do with client-server communication as we'll see later in the app description).ġ x Arduino Uno 3 x 220 Ohm Resistrors 1 x Green LED 1 x Yellow LED 1 x Red LED 1 x TMP36 Temperature Sensor 1 x JY-MCU Bluetooth Slave Module (see introduction) 1 x Breadboard wires To make things very simple, there are two types of devices: Master and Slave a Master can communicate with more than one Slave while a Slave can communicate with a single Master at a time, Master-Master and Slave-Slave communication is not allowed. The one we need to make the connection between Arduino and the Android phone is a Slave Module. This module is available in several configurations, and this has been the first hurdle to overcome. The JY-MCU is a class-2 Bluetooth module that acts like a serial port with no need of any software configuration on the Arduino. There are many Bluetooth modules and even Arduino shields: my choice has fallen on JY-MCU that I bought from Hobby Components in the UK. A simple command structure enables the app to send parameters and values to Arduino and the other way round. In addition, a timer interrupt makes it check for temperature via a TMP36 sensor: if temperature is greater than a threshold a LED is lit every n seconds (where n is a parameter set through the app) a status report is sent to the app. In this project a serial Bluetooth module is used to create a connection between Arduino Uno and an Android app that I created with MIT App Inventor.Īrduino listens for commands to light some LED's or show its status.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |