so i received my second round of the v2 smart controller prototype boards today. the first bunch were really fun and rewarding to receive, but some of the bugs removed some of the fun. here is a comparison of both boards .

here is a picture of the new board … notice the optional new external wifi antenna and battery for the real time clock. ok … enough admiration for now … lets get busy

IMG_20141118_162953 (1)

there are two main ways to install firmware on onto the atmega 2560 side, depending on if it comes with a bootloader installed or not.

installing software on the v2 controller

steps i need to do are:

  • load the bootloader to the 2560 microcontroller through spi using an isp programmer
  • load firmware to the 2560 through the ftdi interface
  • configure 9331 wifi
  • install the linux custom kernel on the 9331
  • install application suit on the 9331

things i will need are:

  • spi avr programmer
  • mini usb cable for ftdi programmer
  • ethernet cable for 9331 network configuration
  • 9-12v psu

these are shown below:



installing the atmega 2560 bootloader:

  • connect the avr ips programmer to the ips connector on the v2 controller board, paying attention to the power polarity
  • using the arduino ide, select  mega 2560 or mega adk as the board type
  • burn the bootloader using the tools menu

installing the atmega 2560 firmware

  • connect the mini usb cable to the mini fdti connector on the v2 controller board
  • flick the programmer toggle switch to the 2560 side
  • using the arduino ide opn the v2 controller code
  • compile and upload

installing the bootloader and firmware using a script

or use the following script if  you have the binaries.






#test 2560 chip

$AVRDUDE -C $AVRDUDE_CONF -c avrisp2 -p m2560 -P usb 

#set fuses

$AVRDUDE -C $AVRDUDE_CONF -c avrisp2 -p m2560 -P usb -b 115200 -e -u -U lock:w:0x3F:m -U efuse:w:0xFD:m -U hfuse:w:0xD8:m -U lfuse:w:0xFF:m

#upload bootloader

$AVRDUDE -C $AVRDUDE_CONF -V -q -q -patmega2560 -cstk500v2 -Pusb -Uflash:w:$BOOTLOADER:i -Ulock:w:0x0F:m

#upload firmware

$AVRDUDE -C $AVRDUDE_CONF -q -q -patmega2560 -cwiring -P/dev/ttyUSB0 -b115200 -D -Uflash:w:$SKETCH:i