Please respond to these tasks in your blog using the same reference numbers.
- 7. 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.
~
- 8. Write a function called Hello()
to output "Hello, world." when it's invoked.
Call this function 10 times in your main loop().
~
- 9. 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.
~
- 10. Write a function to add B0111 to a byte passed to it.
Call it 256 times in loop() using 0-255 as the parameters.
~
- 11. Write a function to AND a byte with B01
and output the result to the screen.
Test this in the main loop().
~
- 12. Write a function to say "yes" if the LSB (least significant bit)
is a 1 or "no" otherwise.
Test in the main loop.
~
- 13. Write a function to left shift a byte in the parameter position
two places to the left then output the original and the final byte.
~
- 14. Write a program to output the bits, one by one,
to the serial monitor screen from an arbitrary byte.
No comments:
Post a Comment