Week 3 Embeded Programming
✅ group assignment: demonstrate and compare the toolchains and development workflows for alternative embedded architectures
For our group lesson, we went over three different microcontrollers: the ATtiny (Tiny412), esp32, and the rp2040.
- Some differences noted:
- ATtiny: needs external bootloader can code with Arduino IDE no micropython (easy way) esp32:
- wifi and bluetooth has its own bootloader can code with Arduino IDE support for micropython! rp2040:
- has its own bootloader
can code with Arduino IDE
support for micropython!
✅ Individual assignment: browse through the data sheet for your microcontroller write a program for a microcontroller, and simulate its operation, to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections) its operation extra credit: test it on a development board extra credit: try different languages &/or development environments
For week 3 I programed a rp2040's LED light, did simulation with the OLED displahy board with Arduino and trying to buy parts for Field Oriented Control of Brushless DC motors
#LED Blink Red and Blue #include
int Power = 11; int PIN = 12; #define NUMPIXELS 1 Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); void setup() { pixels.begin(); pinMode(Power,OUTPUT); digitalWrite(Power, HIGH); Serial.begin(9600); // open the serial port at 9600 bps: } void loop() { pixels.show(); pixels.clear(); pixels.setPixelColor(0, pixels.Color(255, 0, 0)); delay(400); pixels.show(); pixels.clear(); pixels.setPixelColor(0, pixels.Color(0,0,255)); delay(400); Serial.println("hello world"); // prints another carriage return }