Please respond to these tasks in your blog using the same reference numbers.
- Find two Arduino based robot YouTube videos that appeal to you. Put the links into your blog and be prepared to share the videos with the rest of the class.
- Find a diagram of our Arduino board or similar and indicate with arrows where the Tx and Rx pins are on the Arduino I/O pins as well as on the microprocessor itself.
- Write a program to display the ascii table in the serial monitor. Publish a screen shot in your blog.
- Wind up the baud rate in program 4 and report how fast you could get it.
- Write a program to take a key press and output the key and its codes in binary, decimal in hex.
- Repeat 5 but this time use another serial monitor, perhaps Bray++. Screen shot required.
- Connect up your RS232 Tx to the Rx of another Arduino. Output an "A" every second so that the input screen of the other Arduino writes this when it checks and prints the input serial screen. Take a photo of your set-up and publish it in your blog along with the code for Rx and Tx Arduinos. Reverse your roles with your colleague's Arduino. That is, swap the Rx/Tx duties.
- Wrie a function called Hello() to output "Hello, world." when it's invoked. Call this function 10 times in your main loop().
- Write a function DoubleInt to double an integer. Call it like this: Serial.println(DoubleInt(myInt)). Call it twice; once with a number and once with a variable.
- Write a function to add B0111 to a byte passed to it. Call it 256 times in loop() using 0-255 as the parameters.
- Write a function to AND a byte with B01 and output the result to the screen. Test this in the main loop().
- Write a function to say "yes" if the LSB (least significant bit) is a 1 or "no" otherwise. Test in the main loop.
- Write a function to left shift a byte in the parameter postion two places to the left then output the original and the final byte.
- Write a program to output the bits, one by one, to the serial monitor screen from an arbitrary byte.
- Write a subroutine to output a byte using the RS232 soft-serial protocol using 8,N,2 at 9600.
- Input bytes into a colleague's Arduino using the soft-serial from your pin to the Rx of your colleague's Arduino. Write up your code and take a photo of the set-up.
- Write a soft-serial input, Rx, subroutine that takes bytes from a normal 5v RS232 Tx output at 8,N,2 at 9600.
- Get your new motor mini-board to spin in one direction.
- Get it to spin in both directions.
- Get it, using PWM, to spin at different rates.
- Output, using the photo-interrupter, the number of revolutions per second, your motor spins at.
- Same as 21 but this time using the PWM to raise and lower the speed that is reported on the screen.
- Same as 22 but this time add a comment with each speed output to indicate which direction it is spinning.
- Use the example given in class to write your own two wire protocol that can deliver 8 bits on the data line and use the clock line to indicate valid data. Test with a colleague's Arduino and write up your results.
- Same as 24 but this time use a four-bit data path.
- Plan a TWI between two Arduinos. Scan a diagram, or illustrate in some other way, how the connections will be set up and which is master and which is slave. Have a look at http://absences.sofianaudry.com/en/node/10 or at http://arduino.cc/en/Tutorial/MasterWriter for some example code.
- List the main functions of the Wire library. Say what they do with examples.
- Construct a real TWI between two Arduinos. Take a photo and publish your code and any issues you had.
- If I had three Arduinos, is it possible to produce an RS232 ring so that packets of information could go from any Arduino to any other?
- Write a paragraph about the two hardware interrupts on the Arduino and how to use them.
- Carry out the interrupt experiment from the Interrupt post. Change the code you find here.
- Find the post on the Triple Axis Accelerometer. This is an example of a sensor we have to deal with. Find out more information about this sensor and compose a schematic illustrating how you would use an Arduino to real acceleration in three dimensions and display the outputs. Your blog output should contain a schematic and code.
- Find a pin-out of the XbeePro. Using just Arduino's Tx, Rx ,Gnd and 3.3 VCC draw a quick schematic of how two Arduinos would talk to each other without wires.
- Use the above two tasks to produce a schematic of a circuit that would read the accelerometer 's three axis readings and then output to an Arduino and then broadcast out to another Arduino that would send the data to a serial terminal for saving in a file.
- Write the Arduino code for the sender that reads the accelerometer values and sends them via the XbeePro.
- Write the Arduino code for the receiver that's attached to the PC.
- Integrate the new eeprom library from the link here. You should be able to #include this new library this.
- You were issued with an eeprom 24LC64 IC. This is a TWI memory that you connect to SCL and SDA on the Arduino. Run the program from the blog. Show your code changes and the serial monitor output in your blog.
- The problem with the program above is that it can only handle about 30 bytes at a time. Overcome this problem so that any amount of data can be sent up to the capacity of the chip. Write up your findings.
- Copy the Timer0 Polling routine given to you in a previous post and run it with some tidying up. Show your tidy code.
- Repeat the program in 40 but this time make it work a one second LED flash using an interrupt service routine.
No comments:
Post a Comment