Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
I'm a little confused about the concept of UART ports
I recently got myself an Arduino so I can get started with robotics on a kind of basic level.
// Sends "A"s through the serial port every second// 'Setup' functionvoid setup(){ // Start the UART at 9600 bits-per-second (baud) Serial.begin(9600);}// Main loopvoid loop(){ // Print an A through the UART Serial.println("A"); // Pause 1 second delay(1000);}
// Receives data from the serial port// Create a variable called 'val'int val = 0;// 'Setup' functionvoid setup(){ // Start the UART at 9600 baud Serial.begin(9600);}// Main loopvoid loop(){ // If there is data ready... if (Serial.available()) { // ...Set the value of our variable to whatever the data is val = Serial.read(); // Print the data back through the UART Serial.println(val); }}
Thanks for the help! Too bad someone hasn't just created a library for it.
But make sure you use the hardware UART for the camera!
I bought the Arduino with the knowledge that it lacked the extra UART port needed for computer vision
I was wondering if I could use the UART port that is usually used for the usb for a camera once i was done programing.