I can make bluetooth connection with my smartphone. However i can not send command to astar 32u4 mini lv to turn on or off a led. I used Hc-06 bluetooth module. my connections are:
VCC —> 5V
GND —> GND
RX —> TX
TX —> RX
Led —> pin 8
Using “SoftwareSerial” or “Serial1” commands as RX and TX pin “0 an 1” [SoftwareSerial rxtx(0,1)] did not work.
When I tried simply serial port screen to observe any word or sentecnce, if I wrote more than one letter, I just saw meaningless numbers.
How can i fix all of this problems?
I moved your post to our A-Star and Orangutan subforum, which seemed more appropriate.
It sounds like your Arduino code is not properly handling the incoming bytes sent from your smartphone or displaying it correctly in your serial terminal. I suggest looking at the Serial Call and Response tutorial on the Arduino website to get an idea of how to read incoming bytes from the serial port and process the data. It might be helpful to start with the Arduino example and modify it to turn on the A-Star 32U4’s LED. Also, you might try searching for tutorials on creating an “Arduino Bluetooth Serial Interface” on the Internet. For example, I found this tutorial explaining how to turn on and off an LED using an Arduino, an HC-05 Bluetooth module, and a custom smartphone app.
By the way, you should be using
Serial1 and not the SoftwareSerial library, since your Bluetooth module uses the A-Star 32U4’s UART. The SoftwareSerial library allows you to use other digital pins on the Arduino for serial communication if you do not have any available hardware serial ports to use. You can find more details on the SoftwareSerial Library’s page on the Arduino website.
I can use and match this module arduino uno or arduino mega without any problem. However when I used A-star 32u4 mini LV , it is connecting but not turning on the led. Also I tried what you mention above, but could not reach any positive result.
Could you please send the code that you used?
We do not have any code examples for communicating with the A-Star 32U4’s serial interface via Bluetooth.
It sounds like you are able to get some code running on the Arduino Uno and Arduino Mega, but it is not clear if you modified the code to work for the A-Star (which uses the same AVR as the Arduino Leonardo). Did you use
Serial1 or the SoftwareSerial Arduino library? Please post your entire code here.