i have multiwii mwc 328p ftdi/dsm2 port arduino pro mini gyroscope, accelerometer, magnetometer , air pressure sensor
i want use sensors on board , write values serial port or outputpin using pwm. i've been experimenting i2c function. far know sensors communicate way. used code read gyroscope value:
#include <wire.h>
void setup() {
wire.begin(); // join i2c bus (address optional master)
serial.begin(9600);}
void loop() {
wire.requestfrom(0x68,0x20 ,0x8f);
while (wire.available()) {
// char c = wire.read(); // receive byte character
if (wire.read() >0){
serial.print(wire.read());}
}
serial.println();
delay(1000);
}
but got vague numbers...
it nice send axes of gyro arduino mega using pwm or serial communication.
is there code can use lets me use sensors on board or there can me?
i've been looking way long this...
thx
i want use sensors on board , write values serial port or outputpin using pwm. i've been experimenting i2c function. far know sensors communicate way. used code read gyroscope value:
#include <wire.h>
void setup() {
wire.begin(); // join i2c bus (address optional master)
serial.begin(9600);}
void loop() {
wire.requestfrom(0x68,0x20 ,0x8f);
while (wire.available()) {
// char c = wire.read(); // receive byte character
if (wire.read() >0){
serial.print(wire.read());}
}
serial.println();
delay(1000);
}
but got vague numbers...
it nice send axes of gyro arduino mega using pwm or serial communication.
is there code can use lets me use sensors on board or there can me?
i've been looking way long this...
thx
quote
but got vague numbers...what kind of "vague" numbers? "vague numbers" change move accelerometer?
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > multiwii MWC 328p sersors
arduino
Comments
Post a Comment