Homework assignment

Embedded Programming

Read a microcontroller data sheet. Program your board to do something, with as many different programming languages and programming environments as possible.

How to program a microcontroller

I used Arduino IDE and Arduino Mega to program a neural locker controlled by brain-computer interface NeuroSky MindWave. Documentation for Arduino Mega I found here and datasheet for its microcontroller ATmega2560 here. I decided to program the microcontroller using Arduino IDE and processing. To program something drivers should be installed first (you can find them in Arduino IDE folder). Check you Device Manager (if you're using Windows) that you have COM-devices and remember its number or use my program from week 14. Choose your COM-port, Board and Processor inside "Tools" menu:

To upload the code inside microcontroller press Ctrl+U or "File->Upload" inside the menu.
This electronic connection was the worse connection I made ever (this project were ordered to guys from our fablab and they hardly missed deadlines so I help them make things work, but with what price?). I hope you're prepared now:
hide it


Using the code below you can connect microcontroller through bluetooth to Neurosky MindWave and control something using it, neural locker, as example: Video made by Vitaly Zubchenko.
Here is the code: link. Programmed by myself and based on the code of Vsevolod Nikulin.

Also I used Intel Galileo and programmed it using python. To do it Linux distributive should be uploaded to sd-card first. More information about IoT and Intel Galileo you can find from the presentation of my collegue, Sergey Silnov: presentation.

All electronics in one page: design, making input and output + network...