Tuesday, January 6, 2015

NCSS 2015 - Day 3

Thanks oomlout Creative Commons Attribution-Share Alike 2.0 Generic
Lecture 4: We are still dealing with the syntax of the C language. It's tricky to pitch something like this because unlike the Python sessions there isn't a regular versus advanced lecture. I feel it's a bit slow and want more of the electrical engineering to fit in with the labs but there are some non-programmers in the class so that's hard too.

Check out my shiny shiny 3!
I'm think I'm going to do some of the Python activities to prep for the Programming challenge and Crypto challenge to supplement the next lecture.

Lab 3: Was a little disobedient and completed the 7-pin  digital display extension activity from yesterday. I'm pretty happy with it. I need to workout how to use a capacitor to smooth the signal fluctuations on the button but I've put a delay in the software to manage it at the moment.

The proper lab was really interesting. We used temp sensor and soft potentiometer to control outputs, first to read the temperature in the room (mine was incorrect but more about that later) and then to control the output on an RGB LED so that it moved through a spectrum. Missed the extension activities but thankfully I've played with other sensors before.

Lecture 5: Defined #define. If you want to reference a particular pin number throughout the code and you don't want to sacrifice storage to variables or constants you can use #define XXXXX(any string, convention is to use caps) and then the number. This means that the compiler conducts a find/replace at compilation replacing the string with the value, but doesn't need any more RAM to run.. Dealt with function definition and calls. I'd used non-returning functions for the digital display (Note to self: upload interesting code). Interesting note that if the function returns a result then it needs to be defined with a type...

  • int function_name(params) {}. 

Thanks for making this Public Domain Eighthave
Lab 4: A fantastic lab! We used PWM (Pulse Width Modulation) to make a digital signal masquerade as an analogue signal. First we made an LED dim to close to off, close to full power and somewhere in the middle. Then Matt and I set ourselves the challenge of taking input from a joystick to control three LEDs, 1 was binary based on the fire button, 2 were graded based on the x and y inputs of the joystick. That was so much fun! Finally, we just got the buzzer hooked up for experimentation when the end of the lab was called. It was a really irritating noise anyway.

Important stuff learned:
Accuracy vs Precision - Precision speaks about the overall encoding measure accuracy speaks about one individual value.
Map Function - https://www.udemy.com/blog/arduino-map/

Evening Activity: Scavenger Hunt - my favourite! We run through the university grounds looking for clues, challenges and photographs. It was an incredible 2 hours (except it wasn't quite 2 hours because we were back early and got an early arrival bonus).

Memorable moment: Winning the Scavenger Hunt!!

Murder Game: Is it wrong that I keep hiding in my room to avoid my own demise? (Spoke too soon, got killed while showing photographic evidence of the scavenge hunt win... it was almost worth it!)
Murders performed: 1 (it took a very long time to identify the intended victim)

No comments:

Post a Comment