Beruflich Dokumente
Kultur Dokumente
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
Slider
Listpicker1
The AppInventor Blocks
Arduino code