I try to connect pic microcontroller PIC16F877A with pc via bluetooth hc-06.
Before I use bluetooth, I have tried to send data via serial cable, and open it with hyperterminal, and I have no problem with this system.
But when I try with bluetooth and open it with hyperterminal, it come with strange character, I suspect this happen because of the baud rate. But I set the PIC and hyperterminal with the same baud rate. I use 9600 8n+1 with no parity.
Any idea to solve this problem?
One of the documentations (link here) says that there are 2 ways to turn the module on: the way1 with baudrate 38400 and the way2 with baudrate 9600.
Also in the hyperterminal settings try to change the Emulation from 'ANSI' to 'VT100'
Related
I got myself a little STM32F103C8T6 based board that is similar in size to the Arduino Nano, but with a little bit more memory and speed. But for me more important, with 3.3V I/O. It can also be used with the Arduino IDE after you install the correct libraries.
I wanted to connect this to a HC-05 serial bluetooth, especially for remote uploading. But this didn't work. Basic transfer worked, but upload for reprogramming failed.
I tried to adjust the baudrate with AT-commands of the HC-05: e.g.:
AT+UART=57600,0,0
But it still didn't work. What is wrong?
After several tests I noticed that stm32flash printed "8e1" as upload setting. This means even parity. So the correct AT-command should be:
AT+UART=57600,0,2
Baudrates 115200 and 230400 also worked as long as the parity is correct.
But since there are even more things that can go wrong, here is some more information:
Connecting via bluetooth to the HC-05 required using the default password "1234". (This can later be changed with command "AT+PSWD=....".)
Then on my Windows 10 machine two new COM-ports appeared, of which only one was functional.
The most confusing thing was that on Windows you still can adjust the baud rate and serial settings, but it has no effect!
To use the AT-commands I had to connect to another serial port (from an USB to serial adapter). Holding the "Key"-button during power-on enables the AT-mode with 38400 baud.
There is a video that shows the details for a regular Arduino:
https://www.youtube.com/watch?v=xXUKfTNHkKE
"HC 05 Bluetooth Wireless Upload to Arduino" (Wayne Holder)
Even with the correct baud settings, remember to put the STM32 board into correct boot mode and press RESET. And use the correct COM-port.
If you use the serial port in your uploaded program you also must remember to use these settings. E.g.:
Serial.begin(57600,SERIAL_8E1); // for serial init
I have a XBee S2 connected to a Raspberry Pi using the serial port and am trying to use minicom on the Pi to communicate and can not get a response from the XBee. I have tried numerous baud rates but when I enter +++ to wake up the XBee nothing happens.
Below is some of the configuration information.
Xbee:
Baud Rate: 115200
Data Bits etc: 8N1
RPi Config:
OS: Debian(Weezy)
Program used: minicom
Command: minicom -b 115200 -o -D /dev/ttyAMA0
NOTE: I have tried sudo in front of the command as well
I have disabled the console code using the following techniques:
Link to console disable directions
Connection:
RPi Tx to XBee Rx
RPi Rx to XBee Tx
RPi 3v to XBee Vcc
Rpi Gnd to XBee Gnd
Measured voltage on XBee between pins 10(Gnd) and pin 1(V+) measures 3.1vdc
Using Bee adapter V1.4 from ElecFreaks as the Xbee breakout board. Board switched to 3v mode and have tried the other switch on both settings.
Tested RPi by connecting tx to rx on the pi and using minicom the input is echoed correctly.
XBee using X-CTU terminal will work find IE: I enter +++ and it responds with OK.
When its all hooked up I use minicom on the Pi and enter +++ and nothing happens. Blank screen.
I have been working on this for a couple of days and can not seem to figure out what is happening. Please anyone if you can tell me what I am doing wrong or make a suggestion as to something to try I would sincerely appreciate it.
Thanks,
Ed
I have figured it out. I'll post it here so hopefully it will help someone else in the future.
I reversed the TXD and RX connections and viola! It now works as expected. It turns out the breakout board "Bee Adapter V1.4" from ElecFreaks is labeled incorrectly... I hooked TXD from the Pi to the TXD from the board and RXD to RXD and all works fine. I thought I tried that but it works now for some reason. Thank you for your assistance and I hope this helps someone in the future.
Take Care!
I got an Arduino nano V3.0, connected via USB to my computer, and powered with the USB.
I want to use the nano to send a signal over the USB to the computer when it detects a sound of some amplitude.
Anybody knows how to connect a sound sensor to nano as easily as possible?
thanks
rough
I found this link useful http://arduinobasics.blogspot.com/2013/05/sound-sensor.html. Just connect sensor to arduino and adopt code for your needs (you don't need leds, just sensor). To send sensor status over USB use Serial class on Arduino and terminal application on PC.
You have 2 options, one of them is to buy a microphone which outputs a pulse when sound exceeds the threshold you've set on the potentiometer on the board, for example this one: Microphone Detector
The other option is to buy a microphone which outputs an analog stream which can be read by the A0 port on the Arduino Nano.
This Adafruit link can help you understand the code. As you can see, the analogRead(0); reads the A0 port of the arduino.
I am trying to send/receive data over serial connection (GPIO UART pins) between a Raspberry Pi (B model, raspian wheezy) and any pc (tried a netbook and desktop, both running with win 7).
I followed all the stepts found in several tutorials like: http://codeandlife.com/2012/07/01/raspberry-pi-serial-console-with-max3232cpe/
to build a 5V to 3.3V converter. (unfortunately i can't post a pic yet)
The settings for ttyAMA0 in files 'cmdline' and 'inittab' are ok. (like described in many tutorials)
Connecting RX/TX on rpi direct works fine, so i can send text over GPIO pins and receive it. But as i connect it to a pc there is no way to read or write any data. Baudrate 9600 or 115200 doens't matter. (Hardware connection: rpi GPIO -> voltage converter -> serial USB adapter -> pc)
On pc i used Putty. On the rpi:
'echo text >> /dev/ttyAMA0' on the terminal
Putty and
minicom
but no one had success
Is there anything i missed? Could you give me some advice i could look for please.
some ideas:
Whereever i plug the usb into one of 3 available netbook USB ports the win device manager always say it's on COM3... shouldn't it change?
is there a possibility to make some measurements inside the voltage converter wiring to insure that it's not a broken component in the hardware circuit? (i have no knowlegde of it's function)
I have Firmata working fine on an Arduino Uno, communicating over cable USB to Processing.
I want to get rid of the cable, and run the connection over Bluetooth transport (with a BlueSMIRF module). I am unclear on what I need to do to Firmata to tell it to use the BT module rather than the (unconnected) USB cable interface. In particular, do I need to hack Firmata itself to add initialization code which is
specific to the BT module I'm using, or
more generally, needed to tell Firmata to use a port other than the cabled USB?
Thanks
D
I am NOT very good in Firmata, but as i know, Firmata (on arduino) uses 'Serial' (pin 0 and 1, also aka as TX,RX) to communication with the Host. So, if u want to use a BT module to replace your USB cable on the arduino, hack the Firmata to use other pins, other connect the BT to pin 0 and 1.
You have to upload standard firmata with baud rate changed to 9600 inside the ino file (or test with other speed rate) and then connect BTooth TX>Rx(uno RX) and the bt RX>Tx(uno TX) as said in the previous post ,testing it with arduinoCommander worked like a charm!Arduino uno rx tx are pin0 and pin 1.also have it powered not from usb pc but external source cause having the BT ontop while on usb could mess up thing (in general disconnect the ground from BT module while uploading sketches).
All you have to do is make sure the USB is connected only when you are uploading your sketches to the arduino and then have the BlueSMIRF connected when you are ready to actually run the Arduino code. This way they will both use the default hardware serial port and you should not have to modify any code.
You could try and use SoftwareSerial.h in the Arduino to emulate another serial port but I have found that to be problematic.
Just connect Bluetooth to the Rx Tx pin and upload same standard firmata. Then pass command over bluetooth which you were passing over usb cable....it wil work.