My Arduino Serial Monitor is Displaying My IMU Gyro/accel board data as Gibberish - windows-8

I am running windows 8(64) and am using Arduino Uno for the first time. I downloaded the IDE and plugged in my arduino. I'm using a IMU 6050 Accelerometer Gyroscope Breakout Board and am using the first MPU6050 DMP6 example program to test it out. I open up the serial monitor and instead of displaying the text like it should, it only displays a line of weird symbols(cross,box, y with a dot over it, Germanic alphabet letters) and then nothing else. I am brand new to ardruino and can't figure out what to do. I checked the Uno driver and everything is fine. All the arduino files are downloaded, I have downloaded both the MPU library as well as the I2C library. The Uno is blinking, the data is coming through (I think) for some reason its just not displaying right. I have been searching all over the web for days now and I can't find anyone with the same problem.

It sounds like a baud rate mismatch issue. Try to change the baud rate from the drop-down and make sure that it matches the rate passed to Serial.begin in your sketch.

Related

Tinkercad LCD Display Not Displaying Needed Information

Hi there to those whoever can read this. I'm currently working on a Ultrasonic Distance Sensor with the distance information displayed on a LCD Screen in Tinkercad. In my first try, I successfully made the LCD screen display information but on the second, it doesn't despite the two being exact copies of each other.
Working Device: My first try.
Not Working Device: Second attempt
The reason I want to successfully replicate my device is for a Robotics video school project. Is the physical components that I made a mistake in or is it due to code? Thanks.

Transmit Audio Via Micro:bit Radio In MicroBlocks

I am using a BBC Micro:bit version 2 and have a program set up on an editor called Micro:blocks. The code is supposed to take input from the first micro:bit's microphone and play it out of the other one's speaker. But when I try it, all I get is an annoying buzzing noise coming out the other end.
I can play it correctly out of the first micro:bit only (not using radio) and it sounds fine. I can't figure out why the second micro:bit makes a buzzing noise.
With the program without radio, I messed around with how long before it played the noise, and none of the tests resulted in a buzzing noise, so I know it's probably not a timing or delay issue.
Anyways, here is my code.
Transmitting code:
when [button a] pressed
set radio group to (7)
set radio channel to (7)
set radio transmit power to (7)
digital pin write (on) to (28)
forever
analog pin write (microphone + 500) to (0)
radio transmit number (microphone + 500)
when [button b] pressed
stop other processes
radio transmit number (0)
analog pin write (0) to (0)
receiving code:
when program started
forever
if (new radio message)
analog pin write (0) to (radio last received number)
This is an interesting project!
Your program looks correct but the radio system may not be fast enough to send each sound sample as a separate message. As a result, you are just hearing a series of clicks, resulting in the buzzing noise.
You could check that the sound data is being sent and received by sending a second or two of sound and graphing the incoming samples on the receiving side. It will be slow, but you should see something that looks like a smooth audio waveform.
Assuming speed is the issue, you could try sending several samples in each packet by encoding them into a string. But even that may not be fast enough to create a smooth audio stream, especially since the encode/decode process will take time.
A different approach would be for the receiver to collect a second or two of sound samples in a list, then play them back in a burst. That would not provide continuous audio but might allow transmitting a sentence at a time.
Here is a record/playback project you might use as a starting point for experimentation.
Note that you can download this image and drop the .png file into the MicroBlocks IDE. MicroBlocks will read the project back from the image itself :)

Arduino as HID device on Windows - Bind external button presses to a keymap in the OS?

Here's the problem: I want to press an external button attached to an Arduino, and I want that button press to translate into Windows as a keystroke.
My question is, is there a programmable device (I already own an Arduino) that can receive signals, and send them over USB to my computer which will understand it as a keypressExample: Button press acts like hitting the S key on my keyboard?
There are three (four) possibilities:
First Get an Arduino Leonardo (32U4 architecture) - there are HID drivers (so windows recognizes the hardware - short explanation: The Arduino LEONARDO is an integrated USB HID Arduino board. Ideal for projects requiring the board to behave (act) as a USB human interface devices = HID).
Two Use any other Arduino and install Processing with the relevant modules. Write code on both and use Processing to translate to windows.
Three I've seen some more or less working implementations.Example 1Example 2Example 3 Scroll down and you will see a picture of your button solution including code.
(Four) This requires also windows programming skills. Write an usb "driver" a translating engine for I/O between Arduino on usb and acting like a virtual (e.g. touch screen) keyboard. Thats the hardest way to go.

Bluetooth HC-05 sending error 1F for INQ command only

I have a problem with my new bluetooth HC-05 module. In AT-mode it works perfectly with all commands that I need... exept INQ.
I have tried to send whole bunch of other commands beforehand:
AT+INIT
OK
AT+ORGL
OK
AT+ROLE=1
OK
AT+CLASS=0
OK
They all are working just fine. I tried to change IAC and INQM settings as well... but the answer from module is always the same:
AT+INQ
ERROR:(1F)
I read related topic here and tried to push the button at HC-05, as it recommended there, but -- no result either.
I have three modules from the same shop, and they all are working the same way
I have a HC-05 with 3.0-20170601 that I managed to bind to a slave last night. It turns out that the v3 has two AT-modes.
The first is when you hold the button while you connect power. The led will blink slowly and you can connect at 38400 baud. But this is like a configuration mode, where AT+INQ is not available.
In this mode I did these commands:
AT
AT+UART
AT+RMAAD
AT+ROLE=1
(Press and hold the button)
AT+RESET
(Release the button after device restarts and led is slowly blinking)
AT+CMODE=1
AT+INQM=0,5,5
AT+PSWD="9999"
AT should give OK as answer to know connection is working
AT+UART will show configured baudrate. Default is 9600.
AT+RMAAD clears all saved connections
AT+ROLE=1 sets it as master
AT+RESET restarts the device to change to master
AT+CMODE=1 accepts all kinds of devices
AT+INQM=0,5,5 inquires in standard mode, with 5 max connections or 5 secs
AT+PSWD="9999" sets the pin code 9999, change to the pin you need
After this it is time to update the arudino code so that it connects to the configured baud rate. It will be something like
BTSerial.begin(9600);
...or what ever value you might have set the baud rate to. Then reflash your arduino.
Now enter the very irritating second AT command mode.
Power up without holding the button. You will get the fast blink speed. When its powered up, press and hold the button. The led will continue blinking fast, but while the button is pressed you can now connect to the device on the configured baud rate. So open the serial monitor and type AT to verify.
Remember that the mode is only active while the button is pressed. So keep it pressed. I had a small clamp I put on there.
Then I entered these commands:
AT+STATE
AT+STATE will show current state, should be inquiring
Then power up the slave device and the adress should start popping up. It will be something like xyz:xy:xyzw,931F00,7FFF
The first part is the address you want (xyz:xy:xyzw)
Change : to , and get xyz,xy,xyzw
Check that you connecting to the correct device
AT+RNAME?xyz,xy,xyzw
Then bind
AT+PAIR=xyz,xy,xyzw,5
AT+BIND=xyz,xy,xyzw
AT+LINK=xyz,xy,xyzw
The AT+LINK command gave me FAIL as output. But it did not matter.
I restarted and did not press any button before or after. Just normal start.
After 5-10s serial data showed up in my serial monitor.
Modules are bound. And will automatically connect at power up. If not you might have the wrong pincode. Make sure to change 9999 above to 0000 or 1234 or what ever it may be. When I hade the wrong pin I still got OK from the AT+PAIR and AT+BIND commands... It didnt work for me until I entered the correct pin.
Sorry for long post, but I wanted to be thorough since info about HC-05 v3 is very scarce on the internet right now.
A reference to all commands can be found here:
http://www.electronicaestudio.com/docs/istd016A.pdf
(Link valid 2018-08-13)
We have same problem and you can see the answer in here.
The conclusion of problem is about the firmware on HC-05 you use. If you use firmware version 3.0, you will get error 1F in AT+INQ. Maybe HC-05 with firmware version 3.0 has different parameters to run AT+INQ. Now I'm confused about how to find HC-05 with firmware version 2.0. That HC-05 have push button or not.
In short, the answer is: The (B) module with firmware version 2.0-20100601 works ok with the following commands (set PIN34 high at power-up, or press button on module and keep pressed during commands).
So HC-05 with version 2.0 use push button or not, it's the same.
If you have some information about the different between HC-05 version 3.0 and version 2.0, please let me know.

how to use serial communication to change the slides of powerpoint presentation?

I have an arduino uno kit. I 'll be giving it signals .These signals should be able to navigate the slides of powerpoint. Also these signals will be coming thru the serial port .
hence is there any software which allows me directly to do the required slide change ?Or should i be writing a code for the same ? If so in which language as iam quite new to this type of stuffs!
This is basically the same question as this one: What is the best way to access a serial port from VBA?
The answer refers to here: http://www.thescarms.com/vbasic/commio.aspx
One possibility would be to have the arduino emulate the serial mouse protocol and send mouse clicks for the Powerpoint navigation (just like pressing the mouse button to go to the next or previous slide). The problem is that as far as I know there are no serial mouse emulation libraries for Arduino, but I could be wrong.
Another option would be use use the LUFA USB library to have your UNO emulate a USB mouse. The problem with this option is that while LUFA is compatible with the UNO hardware, you need to reflash the firmware. And I believe you can't program it with the arduino IDE.
The easiest option would be to not use the UNO but get a Leonardo or a Teensy both can act as a USB Mouse device and can be programmed with the Arduino IDE.
The hardest part would be reading the serial data coming in and ensuring that it's valid. Then, depending on what command you receive (next slide, previous slide, etc.), send simulated mouse clicks or keyboard presses to PowerPoint. Better yet, you could just use the PowerPoint COM interface.