Read moreWe recognize that private ownership over media, ideas, and technology is rooted in European conceptions of property and the history of colonialism from which they formed.
Fab Academy E14: Machine Design
Designing Network Controllable Stepper Motor Nodes For machine building week our group decided to try and create a 2-axis machine with a stage that could track the motion of a pen drawing on a tabled. My part of the project was to design networked arduino nodes that could be individually addressed and receive synchronization commands. I2C and Arduino We chose to use an I2C network for communicating between the Arduino nodes. The I2C standard includes allows for communicating with each node through unique addresses assigned to the nodes. It also provides support for a General Call address (specifically 0x00) that all nodes will respond to. The problem here is that by default the Arduino I2C library does on enable the General Call response feature. Enabling the General Call response in Arduino The ATmega has built in support for the I2C standard but it’s referred to as it’s Two Wire Interface in all of the documentation. In order to enable the General Call address we only need to add this one line of code in our setup function: TWAR = 0x03; Now is we send out a data on the I2C bus with a destination address of 0x00 all devices on the bus will receive the message. Node Protocol Each node can receive two types of commands. Either a setup move which consists of 6 bytes that define the number of steps, step direction, and speed of the move. The second possible command is synchronized move command that all nodes receive and initiated the start of a movement. Here is the code for an individual node: // Arduino based networked...
Fab Academy E13: Interface and Application Programming
Processing I chose to use processing this week as I had never used it before and am curious about it’s similarities to the Arduino IDE. Much like with most Arduino projects I started by playing with a few example sketches. I ended up hacking together parts from the built in serial SimpleRead example and this example for plotting a graph. With those two I was able to get a simple live graph running that would display light levels from my board over time once the arduino was set up. Arduino Setup I setup my input/output board to continuously read light levels from the phototransistor and send the reading out on the serial port. I also programmed it to listen to the serial port and turn on the boards led on or of depending it a ‘1’ or ‘0’ is received on the serial port input. (The full code is at the end of this post) void loop() { lightValue = analogRead(sensorLight); mySerial.println(lightValue); if (mySerial.available()) { // If data is available to read, val = mySerial.read(); // read it and store it in val } if (val == '1') { // If 1 was received digitalWrite(ledPin, HIGH); // turn the LED on } else { digitalWrite(ledPin, LOW); // otherwise turn it off } delay(30); // Wait 30 milliseconds for next reading } And then used parts of this example for adding in a button that could trigger the sending of a ‘1’ or ‘0’ to the board. (The full code is at the end of this post.) At this point I had a funtioning GUI that could display input from the board...
Fab Academy E12: Networking and Communications
The Plan This week I wanted to wirelessly network multiple microcontroller boards using the super cheap nRF24L01+ modules. Breadboarding The internet warned me that they can be quite flaky and tricky to use with the ATtiny44 so I decided to breadboard a few with an Arduiono UNO and Trinket(ATtiny85) as a starting point. I had to install a custom library for using the Trinket(ATtiny85). Also it’s very important to follow all the warning about adding an extra 10uF capacitor between GND and VCC on the RF module. I had lots of problems until I decided to follow that advice. ATtiny time I then created and ATtiny board thinking that it would be east to port the code from the ATtiny85 to the ATtiny44. This was not the case. The ATtiny couldn’t use the same library and lot of the documentation on it indicated the ATtiny44 wasn’t fully tested with the library. Also the 4k of memory in the ATtiny wasn’t nearly enough to do both the networking functions and anything else interesting. ATmega time Next it was time for an ATmega board. This was also tricky because I started with an ATmega88 which it turns out isn’t supported by the Arduino IDE. I then killed a board attempting to switch it out for an ATmega328. However this board did finally work. It works! I programmed the boards so that one can be a remote control for the other. When you press the button on the remote board it sends a signal to toggle the LED on the other board. Video of it working Design Files The Eagle CAD design files can...