Monday, January 5, 2015

NCSS 2015 - Day 2

Thank you to Afrank99 Creative Commons Attribution-Share Alike 2.0 Generic license
Lecture 2: Going over the C required to make the Arduino do our bidding. A bit revision for me... The Arduino has two necessary functions void setup() and void loop() but you can add more. The setup function allows you to define how different pins will perform. The loop function allows you to define what happens over and over again (all the Arduino can do once autonomous is do the same thing over and over again.) You can nest other loops but once it's got to the bottom it's going back to the top. This explains the need for delays from time to time. 

Lab 1: Beginner circuitry. Hooking up a breadboard, powering an LED, Blinking etc. It was a bit basic. The extension activities had us reading and writing to the serial port which requires the USB cable at this stage but I believe it will be applicable to the Bluetooth portion of the project.

Lecture 3: New Stuff! I encountered some entirely new material! We learnt about polling versus interrupts. The whole time I've mucked around on Arduino this would have been brilliant to know! My Baby Groot project may now be one step closer to fruition. They then did a bunch of conversion of number systems. Finally, we wrapped up learning about volatile variables another crazily useful thing to know. Time to get stuck in!

Lab 2: #TECHWARNING We used a switch to manage an LED programmatically rather than simple circuitry and sent messages to the Serial at the same time. We then implemented a Binary counter for a nibble (half a byte) using 4 LEDs, incremented on the button press. This was a little dodgy, the Interrupt was bouncy and we needed a delay of 200 milliseconds to get rid of the fluctuations. There was some discussion about smoothing the signal with a capacitor.
Source: http://www.texample.net/tikz/examples/seven-segment-display/
I'm really enjoying talking to the tutors about these problems because when it's just you and the internet you can hack workarounds to problems that aren't really best practice. Was just about to adjust the counting program to work for a 7 segment digit display when a teacher meeting was called. D'Oh! I will master you tomorrow 7 segment digital display!

Important stuff learned:
Serial.Read - http://arduino.cc/en/Serial/read
How to write functions - http://playground.arduino.cc/Code/Function
Gangnam style had so many views it caused an overflow error! Not up on internet culture.
There is code for a seven segment display on Nerd Club (http://nerdclub-uk.blogspot.com.au/2013/05/messing-about-with-7-segment-displays.html) but I won't be reading it until I've succeeded.



Evening Activity: Trivia - All students in their teams from the camp, teachers in a team together, tutors in a team together. We came second last and they came last. There may have been some weighting of the answers.



Memorable moment: Making unauthorized newspaper costumes for our 30 second rendition of the complete Lord of the Rings trilogy (subtitled -how long the Lord of the Rings trilogy would have been with all the boring bits taken out)

Murder Game: Still alive!
Murders performed: 2 (today)
There's not many of us left now so I have definitely earned some cred from last year. Paranoid!

No comments:

Post a Comment