Software > Software

getting data from a custom compass sensor

<< < (2/2)

waltr:
Ok.
I saw this in the code:
Serial.begin(9600);
which sure looks like async serial.
Always learning something here.

jwatte:
Yes, Serial.begin(9600) configures the UART for serial communication. But that serial communication only happens when you make other calls to the Serial module. The Wire module is totally separate. As is the Servo module, or the LiquidCrystal module, or pretty much any other module :-)

Jak24:

--- Quote from: jwatte on July 10, 2013, 03:08:06 PM ---Hook the oscilloscope to the clock and data lines when using the working controller, and look at the signals. Measure timing (how fast does it run?)
Then, hook the oscilloscope to the Arduino set-up to the clock and data lines, and look at the signals. Are they different? Too fast? Different voltage? Different rise/fall times?


--- End quote ---

So I took a couple of pictures of the oscilloscope and here are the results
Custom controller sda line:
 
Custom controller scl line:

Arduino scl line:

Arduino sda line:

At least to me, It seem that the arduino lines aren't transmitting any data packets.
I apologize if I didn't measure it properly, or didn't show the correct detail, I just recently got this oscilloscope and I
am still learning how to use it.
Any ideas on how to continue ?

jwatte:
The i2c bus transmits at 400 kHz by default IIRC. Some devices only support 100 kHz, so you may have to change it to do that.

I doubt that a scope showing signals at 60 Hz or 5 kHz would see signals at 400 kHz; you need significantly faster scanning to see that.

However, looking at your oscilloscope pictures, you're seeing lots of noise at 60 Hz (line noise) meaning your input voltage isn't particularly clean.

Navigation

[0] Message Index

[*] Previous page

Go to full version