Go Down

Topic: Serial1 (Read 849 times) previous topic - next topic

mitcho

As some of you may know from my posts, i ordered a bluetooth modem to use as a serial interface for my board and computer wirelessly. i know that it needs to be connected to the Rx and Tx serial pins.

i read that for Wiring, you need to use Serial1 (http://wiring.org.co/reference/libraries/serial/Serial1_.html) to talk to these pins.

Does arduino have something like this?

mellis

You can use pins 0 and 1 for TTL serial communication using the standard Arduino commands: beginSerial(), serialWrite(), printInteger(), etc.   The difference with Wiring is that you can't simultaneously connect the Arduino board to the computer (or other device) through the USB (or serial) plug.  The ATmega128 on the Wiring board has two hardware serial devices (UARTs) so it can talk to an external device and the computer at the same time.  The ATmega8 on the Arduino board only has one.

mitcho

#2
Apr 05, 2006, 04:13 am Last Edit: Apr 05, 2006, 04:15 am by mitcho Reason: 1
Does this mean i can Write my program to the arduino board using wireless bluetooth??

i know for the wiring board, u need to send your program to board using only USB - and then use Serial1 for communication with bluetooth.

fallen

Yes, you can Write your program to the arduino board using wireless bluetooth, I do it every time , it works well. And wiring board can do it also , just disconnect USB , and connect the BT to the serial0 , then it will work.

mitcho

really. i havent been able to write to arduino with the bluetooth. i have to use usb, otherwise i just get errors.

fallen

Hi ! mitcho , I write to arduino with the bluetooth everytime now , you should make sure that :
when you write to arduino , I icon of bluetooth should be green , because the bluetooth connect will cut off when the com of bluetooth is closed 10s.

Go Up