5. int buttonPin = 3;
// setup initializes serial and the button pin
void setup()
{
beginSerial(9600);
pinMode(buttonPin, INPUT);
}
// loop checks the button pin each time,
// and will send serial if it is pressed
void loop()
{
if (digitalRead(buttonPin) == HIGH)
serialWrite('H');
else
serialWrite('L');
delay(1000);
}
MCU (CPU + Memory)
C++ with Processing
Time-sharing coding
Simple to start, easy to learn
No complex package dependencies
Cheap and low energy
Digital/Analog IO
WIFI, BLE not included
14. PROS
Node.js / Python
Built-in WIFI, BLE support
A bit expensive but still affordable
GPIO
It’s linux
CONS
3.3V out
Complex setup (wifi, ssh …)
Not cheap
It’s linux man