HTMAA - Week 8: Embedded Programming



Week 8 is about programming embedded micro-controllers or integrated circuits (IC's). The main goal is to set up the workflow that allows for writing of custom code to the memory of an AVR chip in order to control the chip's functioning and some peripherals connected to it. I programmed my board from the previous Electronics Design class to hold a green LED solid when no interaction was happening and when the button was pressed, to flash a red LED.

Also, for the Networking and Communications recitation, I flashed the ESP8266 breakout board to its original AT command firmware and tested manually issuing AT commands via the FTDI cable, connecting it to the MIT GUEST network, and having it respond to HTTP requests with simple text output.



Links:

Embedded Programming Notes by JBobrow for getting C programs onto an ATtiny using the FabISP:
- https://gist.github.com/jbobrow/515b3c1dc0ede2d49030

Wiring the breakout board:

Setting up the ESP8266 (HUZZAH Breakout Board)

Flashing the AT command set firware:

- Setting module to bootloader mode

- Port (From Arduino IDE via FTDI > USB): /dev/cu.usbserial-A603V09E
- Download https://github.com/themadinventor/esptool
- sands$ sudo esptool.py -p /dev/cu.usbserial-A603V09E write_flash 0x000000 v0.9.2.2_at_firmware.bin

 	Connecting...
 	Erasing flash...
 	Wrote 520192 bytes at 0x00000000 in 52.0 seconds (80.0 kbit/s)...

 	Leaving...

Testing the flashed module

sands$ ./esptool.py -p /dev/cu.usbserial-A603V09E read_mac

 	Connecting...
 	Traceback (most recent call last):
 	File "./esptool.py", line 532, in 
 	esp.connect()
 	File "./esptool.py", line 159, in connect
 	raise Exception('Failed to connect')
 	Exception: Failed to connect

Other commands to try: