SparkFun 9DoF Razor IMU M0 wireless?

All things pertaining to wireless and RF links

Moderator: phalanx

Post Reply
Lpastorsanchez
Posts: 6
Joined: Mon Jan 23, 2017 5:01 pm

SparkFun 9DoF Razor IMU M0 wireless?

Post by Lpastorsanchez » Thu Jul 27, 2017 4:36 pm

I connected the 9DoF Razor IMU MO with bluetooth:
Razor IMU Mo ----> Bluetooth,
GND ---> GND
3v3 ---> VCC
TX ---> RX
RX ---> TX
And 9DoF Razor IMU MO does not transmit data.
Do I need to configure something?

Valen
Support Volunteer
Posts: 1743
Joined: Wed Dec 22, 2010 2:05 am

Re: SparkFun 9DoF Razor IMU M0 wireless?

Post by Valen » Fri Jul 28, 2017 8:53 am

Probably. Tell more about what bluetooth module you have. The Razor probably needs to contain code that sets it up right before data can be sent and received.

Lpastorsanchez
Posts: 6
Joined: Mon Jan 23, 2017 5:01 pm

Re: SparkFun 9DoF Razor IMU M0 wireless?

Post by Lpastorsanchez » Fri Jul 28, 2017 11:40 am

Thanks you.
I have many SparkFun Bluetooth Mate Gold.
The SparkFun Bluetooth Mate Gold is well configured because it was used with 9 Degrees of Freedom - Razor IMU retired, even using only the terminals GND, Vcc, Tx and Rx.
Now, I am using SparkFun 9DoF Razor IMU M0 with SparkFun Bluetooth Mate Gold previously configured. I start with monitor serie of Arduino and SparkFun Bluetooth Mate Gold change the led from red to green but the SparkFun 9DoF Razor IMU M0 does not transmit nothing.
I am using the code download of _9DoF_Razor_M0_Firmware-v1.0.0.zip and only changed the following: //#define ENABLE_NVRAM_STORAGE.
Thanks you.

Valen
Support Volunteer
Posts: 1743
Joined: Wed Dec 22, 2010 2:05 am

Re: SparkFun 9DoF Razor IMU M0 wireless?

Post by Valen » Sat Jul 29, 2017 5:21 am

Found the cause. Actually, somebody else did. See the end of the comments of the Razor IMU M0 hookup guide page:

(TLDR: The TX and RX pins on the Razor are a different serial port than the one provided by the USB connection (the one serial monitor sees when it is plugged in). SerialUSB vs. Serial1. The example code that it shipped with needs to be fixed to output to the RX/TX pins/bluetooth module )
bboyho / about 5 months ago * / 1
——————– Tech Support Tips/Troubleshooting/Common Issues ——————–

Serial Output through Hardware UART pins

The default test code does not output serial data automatically to the hardware Tx and Rx pins. It is currently waiting for a “$” under our QC test procedures [ https://github.com/sparkfun/9DOF_Razor_ ... e.ino#L163 ]. Depending on what imu value you want printed from the string, you would need to write additional code to print serial data with the correct function [ Serial1.print() or Serial1.println() - https://learn.sparkfun.com/tutorials/sa ... rial-ports ] somewhere around this function => [ https://github.com/sparkfun/9DOF_Razor_ ... e.ino#L168 ]. Additionally, the serial object is defined here => https://github.com/sparkfun/9DOF_Razor_ ... nfig.h#L25 ] for the Arduino serial monitor or the hardware serial UART port 1 on pins 0 and 1. Be sure to change the baud rate when you initialize the serial port to match the receiving serial device. By changing a few lines and printing the string to one of the hardware UARTs, other serial UARTs can read the serial data.

If you have not used a serial UART before, try looking at this tutorial for more information about serial communication and UARTs [ https://learn.sparkfun.com/tutorials/se ... munication ] .

Valen
Support Volunteer
Posts: 1743
Joined: Wed Dec 22, 2010 2:05 am

Re: SparkFun 9DoF Razor IMU M0 wireless?

Post by Valen » Sat Jul 29, 2017 5:40 am

Follow the installation procedure of the Hookup Guide instead. Using the latest code from the Github repository only the config.h file needs to be modified in line 25 to output to the hardware serial port instead of the USB port. (I mean, I assume that it works. I never had such a board myself to play with.)
config.h wrote:////////////////////////
// Serial Port Config //
////////////////////////
#define ENABLE_UART_LOGGING true
// Select the Serial port to log to. Either SERIAL_PORT_USBVIRTUAL
// or LOG_PORT SERIAL_PORT_HARDWARE (SerialUSB or Serial1)
#define LOG_PORT SERIAL_PORT_USBVIRTUAL
#define SERIAL_BAUD_RATE 115200 // Serial port baud

JMB1603
Posts: 1
Joined: Mon Aug 20, 2018 9:28 am

Re: SparkFun 9DoF Razor IMU M0 wireless?

Post by JMB1603 » Mon Aug 20, 2018 9:38 am

I am trying to do the same but I too cannot transmit data via Bluetooth. I have changed line 25 in the config.h file, is there something else I need to do?

Post Reply