Take and input or output device and make an application that interfaces with it, try as many options as possible. I'm going to focus on Javascript with a serial interface and D3 for data visualisation. I might switch to a stepper or brushless DC motor and get some form of feedback of motor location. Also try making an online game engine using Unity. Check out Sage for mechanism design as a form of symbolic programming tool.
Tutorials for web page interaction
I started off by doing a bunch of tutorials from the Mozilla Developer Network:
Good explanation of internet connection, TCP/IP, DNS, HTTP and component files through an anaolgy with walking to the shop
Getting serialport working
I followed a few different forum posts and tutorials to get Node and npm (Node Package Manager) installed and up to date.
This tutorial was particularly helpful in getting serial communication up and running between Chrome and an Arduino Pro Mini.
Once I had node, npm and the serialport library installed correctly I could run the following code to show the serial ports open on my computer:
var serialport = require('serialport'); serialport.list(function (err, ports){ ports.forEach(function(port) { console.log(port.comName);});});
This tutorial was also quite helpful for getting serialport running however I recommend the tutorial linked below for setting up the client and server.
Setting up server and client through a socket
This tutorial was really really helpful in going through the code required on the server and client side to set up a web socket. Once I had information flowing both ways between the client and the server I set up serialport on the server side and started sending information back and forth from an Arduino.
Success
Next I need to get communication going to DC servo controller board
Notes from class feedback
Use rx.py and term.py to monitor serial output of an AVR
Chrome has in browser serial communication, apparently works really nicely. This means you don't have to separate application into server and client, just talk straight from the browser.
When plotting binary numbers, they don't have a natural idea of a sign (-ve or +ve). To overcome this you use twos-complement but this means you need to be a little careful about maths that goes on at the origin.
Check out avr-libc to understand capability of libraries built into the compiler
The stock accelerometer has an I2C interface, you learn to use I2C using the register information in the data sheet then you can access a large range of information. To use I2C, you read and write according to the resgister.
Set pins to interrupt when they are triggered rather than continually polling them.#include , #define serial_interrupt (1< and an interrupt program do the job, example code here. Interrupts take 5 or so ticks of a 20ns clock, therefore a while loop is faster to respond but it's unlikely you will require less than 5ns for an interrupt to get to work.
AT88 has the USART if you need better peripherals. However you might not ever need this as you have plenty of software cycles based on 20MHz and 9600 baud rate
If you want to PWM audio, use hardware rather than software. XMegas have waveform generator to create PWM for you up to the speed of the clock. The XMegas can upsample the processor clock significantly
Try Vpython to create 3D displays and animations in Jupyter Notebook...airship...
Try using Unity to program an interface, very easy to get up and running
Node packages installed go into your program. You can do npm install -g (to install globally) or generate a list which you install separately.