multiwii MWC 328p sersors

multiwii MWC 328p sersors

Postby jaan55 » Fri Nov 06, 2015 4:11 pm

I have a multiwii MWC 328p FTDI/DSM2 port
I just want to use the sensors on the board and write their values to a serial port or to an outputpin using pwm. I've been experimenting with the i2c function. As far as I know the sensors communicate that way. I used this code to read a gyroscope value:

#include <Wire.h>
void setup() {
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600);}
void loop() {
Wire.requestFrom(0x68,0x20 ,0x8F);

while (Wire.available()) {
// char c = Wire.read(); // receive a byte as character
if (Wire.read() >0){
Serial.print(Wire.read());}
}
Serial.println();
delay(1000);
}


But all I got from this are some vague numbers...
It would be really nice to eventually send to axes of the gyro to my arduino mega using pwm or serial communication.
Is there a code I can use that lets me use the sensors on the board or is there someone who can help me?
I've been looking way to long for this...
thx
jaan55
 
Posts: 1
Joined: Fri Nov 06, 2015 3:45 pm

Return to Shields, boards and sensors

Who is online

Users browsing this forum: No registered users and 0 guests

cron