0% found this document useful (0 votes)
80 views13 pages

MIT App

The document provides instructions for 3 Arduino projects of increasing complexity: 1. A simple addition calculator app expanding to multiple operations. 2. An Arduino LED control circuit using Bluetooth to turn an LED on and off from a phone app. 3. An Arduino servo motor control circuit using Bluetooth and a slider in a phone app to set the servo position. Diagrams and code are provided for each circuit.

Uploaded by

Mofude Fuizaru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views13 pages

MIT App

The document provides instructions for 3 Arduino projects of increasing complexity: 1. A simple addition calculator app expanding to multiple operations. 2. An Arduino LED control circuit using Bluetooth to turn an LED on and off from a phone app. 3. An Arduino servo motor control circuit using Bluetooth and a slider in a phone app to set the servo position. Diagrams and code are provided for each circuit.

Uploaded by

Mofude Fuizaru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Let’s Get Started

Build 1 :
Simple Addition Calculator
Exercise :
1. DO simple addition calculator as
shown
2. Expand functionality by adding
multiple operations (multiply,
divide, minus)
Designer 3. Use more than three inputs

Block
Compile and MIT AI2
• Install MIT AI2 Companion from PlayStore
• Make sure phone and laptop connected on same WIFI
network
• Launch MIT AI2 from your phone
• Select connect > AI companion
• Scan QR code using MIT AI2
Build 2 :
Arduino Control LED
Hardware:
1. Arduino UNO
2. LED
3. Bluetooth module ( HC-05 or HC-06)
4. Male to male jumper wire
5. Breadboard
6. Android smart phone
Arduino code
int led = 9; // pin LED 9
int value; // initial value of input

void setup()
{
Serial.begin(9600); // Serial comm begin at 9600bps
pinMode(led, OUTPUT);
digitalWrite(led, LOW); // initial LED OFF
}

void loop()
{
while (Serial.available()) //read while data is present
{
value = Serial.read(); //value = serial read data from phone
if (value == 0) {
digitalWrite(led, LOW);
}
if (value == 1) {
digitalWrite(led, HIGH); // LED ON
}
delay(10);
}
}
Circuit Assemble

For the HC-05, the VCC is connected


to 5V, GND to GND, RX of HC-05 to
Arduino TX, while TX of HC-05 to
Arduino RX.
The AppInventor Designer
The AppInventor Blocks
Build 3 :
Arduino Control Servo
Hardware:
1. Arduino UNO
2. Servo motor
3. Bluetooth module ( HC-05 or HC-06)
4. Male to male jumper wire
5. Breadboard
6. Android smart phone
The appinventor design

Slider

Listpicker1
The AppInventor Blocks
Arduino code

#include< Servo.h > // include server library


Servo ser; // create servo object to control a servo
int poser = 90; // initial position of servo
int value; // initial value of input
void setup() {
Serial.begin(9600); // Serial comm begin at 9600bps
ser.attach(7); } // server is connected at pin 7
void loop() {
while(Serial.available()) { //read while data is present
value = Serial.read(); //value = serial read data from phone
poser = value ; //than position of servo motor
ser.write(poser); // the servo will move according to position
delay(15); }
}
Assemble the circuit and test It!!

You might also like