Difference between revisions of "CSC270 Final Exam 2012"
Line 158: | Line 158: | ||
==Misc. Information== | ==Misc. Information== | ||
===Arduino=== | ===Arduino=== | ||
+ | * The Arduino only sends the lower 5 bits of the ASCII characters because the first 3 bits for 'A' to 'Z' are always 010. 'A' is '''010'''00001. 'B' is '''010'''00010, ... 'Z' is '''010'''11010. | ||
* The Arduino will keep its program in memory when it is powered off. This means that as soon as you connect it to a live USB port, the sending program will start. The Arduino will wait for the receiving hardware to activate ACK and get characters. | * The Arduino will keep its program in memory when it is powered off. This means that as soon as you connect it to a live USB port, the sending program will start. The Arduino will wait for the receiving hardware to activate ACK and get characters. | ||
− | * You can reset the Arduino and force it to restart the program by pressing the small push-button in the middle of the board. | + | * You can reset the Arduino and force it to restart the program by pressing the small push-button in the middle of the board. Upon reset, the Arduino will right away start sending an 'A'. |
* You can easily test whether your Arduino is running properly by connecting its STB to its ACK signal in a loop. In effect you make it think it has a very very fast receiver that sets its ACK simultaneously as the STB is activated. In other words, if you connect Pin 3 of the Arduino to its Pin 4, it will think it has a live receiver and will send all the letters of the alphabet in 13 seconds, flashing its LED for 1/2 second once a loop. | * You can easily test whether your Arduino is running properly by connecting its STB to its ACK signal in a loop. In effect you make it think it has a very very fast receiver that sets its ACK simultaneously as the STB is activated. In other words, if you connect Pin 3 of the Arduino to its Pin 4, it will think it has a live receiver and will send all the letters of the alphabet in 13 seconds, flashing its LED for 1/2 second once a loop. | ||
* You can download the Arduino IDE (free from [http://arduino.cc/hu/Main/Software http://arduino.cc]). If you want to upload a modified version of the software to the Arduino board, make sure you set the board type in the '''Tools''' section to '''Diecimila'''. | * You can download the Arduino IDE (free from [http://arduino.cc/hu/Main/Software http://arduino.cc]). If you want to upload a modified version of the software to the Arduino board, make sure you set the board type in the '''Tools''' section to '''Diecimila'''. |