kgraf wrote:Your search choice is much better than gyro+arduino+motor+wiring diagram
I can't log into my account to check my order status
Order Number is: 198436
Is this because I paid through paypal?
How can I find out if my order has shipped?
hi kgraf,
please email [email protected] and we can give you a status and also how to log in to your account.
I need a pressure sensor for the operator's hand to squeeze to make the gripper open and close, do you recommend any particular type of pressure sensor or specific pressure sensor?
I bought a https://www.adafruit.com/products/1075 Square Force-Sensitive Resistor (FSR) - Interlink 406. Do you recommend any code source to begin programming the arduino mega?
I now have the components (except for the FSR). 9V ac to dc adapter ok for mega? I have arduino for windows installed in win7.
My initial problem is connecting the gyro to the arduino and then reading the data from the gyro. the gyro is to detect angular motions of a human arm mastering the robot' arm's slave motion. Do you recommend any reference to begin writing code from? The idea is gyro data to arduino mega to motor driver like drv8833 to dc motor on the owi 535 robot arm. The same for the FSR to control the gripper. I'm guessing the gyro is a lot harder to program than the FSR.
Trying to connect the L3GD20 gyro breakout board to mega2560 R3 microcontroller.
Uncertain about which pins to connect from gyro to mega
gnd on gyro board to any gnd on mega?
Vcc on gyro board to 3.3V or 5V on mega?
SCL on gyro to SCL 21 on mega? //communications section of mega
SDA on gyro to SDA 20 on mega? //communications section of mega
also, what is Wire.h and how include Adafruit_L3GD20.h with Adafruit_L3GD20.test in
sketchpad - sketch/add file?
#include <Wire.h>
#include <Adafruit_L3GD20.h>
when is the power connection needed on the mega board? I did the sample blink with
only the usb connected and it worked fine.
Re:
Getting started is easy - simply connect SDA to your Arduino I2C data pin (On the UNO this is A4), SCL to I2C clock (Uno: A5), GND to ground, and Vin to 3 or 5VDC. Then install and run our easy to use Arduino library, which will print out the XYZ sensor data to the serial terminal. Our library also supports SPI on any 4 digital I/O pins, see the example for wiring.
// By default, uses I2C
//Adafruit_L3GD20 gyro;
// Alternately, you can use SPI, but you have to define the pins
#define GYRO_CS 4 // labeled CS
#define GYRO_DO 5 // labeled SA0
#define GYRO_DI 6 // labeled SDA
#define GYRO_CLK 7 // labeled SCL
Adafruit_L3GD20 gyro(GYRO_CS, GYRO_DO, GYRO_DI, GYRO_CLK);
gnd on gyro board to any gnd on mega?
Vcc on gyro board to 3.3V or 5V on mega?
SCL on gyro to SCL 21 on mega? //communications section of mega
SDA on gyro to SDA 20 on mega? //communications section of mega
Yes.
what is Wire.h
Wire.h is part of the standard Arduino libraries. It is used for I2C communication with the Gyro.
and how include Adafruit_L3GD20.h with Adafruit_L3GD20.test in
sketchpad - sketch/add file?
Initially, Adafruit_L3GD20_test with the wiring connected gave a compile error msg, then I added Adafruit_L3GD20.h and Adafruit_L3GD20.cpp to the Wire folder under Libraries and it compiled and uploaded and then does nothing - no response - not even a msg. I tried uploading again and got error msg 'com3 already in use' or it just hangs on upload. Is the program uploaded once and then with no changes made subsequent uploads cause problems?
I tried to upload blink and got it running again after disconnecting/reconnecting the usb and then retried Adafruit_L3GD20_test with no wires connected to see if it gave the error msg to 'check wiring' but it doesn't complete the upload.
What can I do? It has hung at 90% upload for 15 minutes or more.
Do I ever need to press the reset button with the mega board? Re:
Note: If you have an Arduino Mini, NG, or other board, you'll need to physically present the reset button on the board immediately before pressing the upload button.)
just noticed these error msgs in compile window
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x10
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
// Try to initialise and warn if we couldn't detect the chip
if (!gyro.begin(gyro.L3DS20_RANGE_250DPS))
//if (!gyro.begin(gyro.L3DS20_RANGE_500DPS))
//if (!gyro.begin(gyro.L3DS20_RANGE_2000DPS))
{
Serial.println("Oops ... unable to initialize the L3GD20. Check your wiring!");
while (1);
}
}
Sounds like you have multiple problems there. We will forget about the libraries for the moment and first figure out why the Mega is not communicating.
What LED activity do you see on the Mega whan you attempt an upload?
the green led next to the reset button is on constantly
I have no jumpers on the board or with the board currently,
I have no connections to the board except the usb - the gyro board connections have been removed
the yellow led above the TX and RX leds is blinking 2 sec on 1 sec off
from a change in the blink sample program
when I originally uploaded the program after adding the .h .cpp file the rx tx leds
flashed and the yellow led stopped flashing but it didn't give any response to the gyro test program and no error msgs either
now after about 15 minutes of incomplete uploading it gives error msgs and says done uploading:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_command(): failed miserably to execute command 0x11
avrdude: stk500v2_disable(): failed to leave programming mode
that was the adjusted blink example program
I just put the original blink in and it works fine also
I then directly (without unplugging the usb) uploaded the example fade with led pin 13 (same as blink) instead of 9 and it works just fine also
I am thinking the problem is in the Adafruit_L3GD20_test software or library files
I notice that tools/serial port/com3 is sometimes empty blank (program running?) and sometimes shows com3 with a check next to it. it is the only com listed
the reset button doesn't seem to be needed - programs switch immediately after uploaded even on the fade program that says push the reset button to start