Loading...
  Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: help with ATmega328 with MPU 6050 accelerometer sensor on: May 09, 2013, 09:01:07 pm
I also have a MPU-6050 from Elecrow. I connect the VCC to 3V3, GND to GND, SCL to A5, SDA to A4.
And I upload the demo code at the bottom of the wiki page.
Open the serial monitor, set the rate as 38400. it works fine.
Code:
Initializing I2C devices...
Testing device connections...
MPU6050 connection successful
a/g: -3236 -3336 12892 -113 -194 -212
a/g: -3360 -3404 12860 -113 -256 -226
a/g: -3344 -3336 12924 -109 -293 -225
a/g: -3404 -3376 12820 -116 -379 -276
a/g: -3108 -3336 12904 -179 12 -231
a/g: -3396 -3404 12840 -224 297 -209
a/g: -3428 -3520 12872 -227 524 -194
a/g: -3372 -3416 12828 -242 726 -108
a/g: -3484 -3428 12684 -251 684 -49
a/g: -3372 -3352 12684 -226 706 -76
a/g: -3380 -3348 12704 -153 604 -107
a/g: -3260 -3512 12768 -85 694 -149
a/g: -3376 -3444 12632 6 380 -392
a/g: -3436 -3504 12768 118 164 -330
a/g: -3380 -3352 12752 169 144 -346
a/g: -3492 -3368 12696 181 247 -249
a/g: -3328 -3380 12884 122 123 -176
a/g: -3352 -3280 13176 59 34 -127
a/g: -3344 -3336 13060 -69 189 -118
a/g: -3384 -3228 12920 -191 392 -154
a/g: -3356 -3236 12992 -281 534 -142
a/g: -3336 -3216 12880 -280 583 -189
a/g: -3388 -3208 12792 -313 581 -153
a/g: -3536 -3380 12704 -178 117 -219
a/g: -3496 -3464 12768 -117 137 -202
a/g: -3480 -3384 12916 -69 104 -196
a/g: -3684 -3336 12908 -109 78 -202
a/g: -3648 -3368 13040 -188 140 -185
a/g: -3456 -3268 12888 -162 112 -198
a/g: -3500 -3280 12744 -193 65 -181
a/g: -3540 -3340 12952 -234 250 -172
a/g: -3584 -3320 12804 -216 151 -190
a/g: -3472 -3364 12696 -156 -180 -273
a/g: -3460 -3372 12772 -165 -149 -186
a/g: -3500 -3356 12888 -142 -238 -179
a/g: -3408 -3396 12844 -194 -97 -150
a/g: -3404 -3404 12872 -195 141 -97
a/g: -3368 -3284 12780 -179 46 -198
2  Using Arduino / Sensors / Re: help with ATmega328 with MPU 6050 accelerometer sensor on: May 03, 2013, 08:30:50 am
but in the board there is a switch 3V3_VCC_5V on the lower left corner and I don't know where
it goes if in the 3V3 or VCC or 5V.

The VCC is the power for the Atmega328.
If press the switch to 3V3, the VCC ==3V3. If press the switch to 5V, the VCC==5V.

If VCC==3V3, when the output of the digital pins& the analog pins is high, the voltage is 3.3v.
if VCC==5v, it is the same as Arduino.
3  Development / Other Hardware Development / Re: Small-run PCB assembly on: April 20, 2013, 09:35:20 pm
I think that Elecrow is a good choice.
They don't only provide PCB fabricate service without charge extra fees for color options,
they also provide PCB Assembly service.
http://www.elecrow.com/services-c-73/prototyping-service-c-73_120/pcb-assembly-p-366.html

Hope you find this useful.
4  Using Arduino / Project Guidance / How can I use the XBee of Crowduino? on: March 01, 2013, 06:57:47 am
I'm a newbie for Arduino, I purchased a GPRS/GSM Shield,a Relay shield and a Crowduino from elecrow.
I can remote control via SMS follow this instructable tutorial http://www.instructables.com/id/Control-the-relays-via-GPRS-SMS/ smiley
I can also make a call to other phones with GPRS/GSM shield follow this wiki http://www.elecrow.com/wiki/index.php?title=GPRS/GSM_Shield_v1.0.

I see that the Crowduino also has an XBee socket.
and it says that it adapts to the Xbee modules from Digi, http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/zigbee-mesh-module/xbee-zb-module
and any module with the same footprint.
But I don't find a tutorial for it. So I want to know that whether there are also some tutorials for using the XBee socket.
Thanks!
5  Using Arduino / Programming Questions / Re: GPRS/GSM Shield Time Setting Problems on: January 11, 2013, 09:47:22 pm
I have solved this Serial Buffer problem. and I print what I do to solve this
The following code is which works as I expect. The Serial port can print again and again.
Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8); // RX, TX
int i=0;
void setup() 
{
 // Open serial communications and wait for port to open:
  Serial.begin(19200);
  // set the data rate for the SoftwareSerial port
  mySerial.begin(19200);
}
void loop() // run over and over
{
mySerial.println( "AT+CCLK =\"12/12/27,10:43:50+08\"");
   delay(50);
  if (mySerial.available())
    Serial.write(mySerial.read());
   delay(50);
mySerial.println( "AT+CCLK?" );
    delay(50);
    if (mySerial.available())
    Serial.write(mySerial.read());
   delay(50);
   i++;
   if (i==50)
   {
   mySerial.flush();
   i=0;
   }
}
hope you find this useful when you meet problems with SoftwareSerial Buffer problem.
6  Using Arduino / Programming Questions / Re: digitalwrite(3, HIGH) 1.5Vdc instead of 5Vdc on: January 09, 2013, 04:30:06 am
I abused the uC and bend the pin. It puts out a nice 5Vdc. Now what happens when I put my multimeter in between the bend pin and the ULN, precisely 99uA is drawn. Is that a limitation of the PWM pin?

As my experience , all the pins can supply 20 mA drawn.
7  Using Arduino / Programming Questions / Re: GPRS/GSM Shield Time Setting Problems on: January 01, 2013, 08:21:08 am
Fix the first problem. The follow-on problem may go away.
Thanks for your advice.
What I asked is that delay more time, and the result is more data to show.
so I don't think it's really done with the first problem.
8  Using Arduino / Programming Questions / Re: GPRS/GSM Shield Time Setting Problems on: January 01, 2013, 01:52:09 am
Why you are repeatedly sending a command to set the time is a mystery. That should be done ONCE, in setup().
Thanks for your tips, I will do as you said, setting the time at the setup(). and this program will only be done one time before I upload my  project code. And GPRS/GSM Shield will be on power all time to keep its RTC run.
Quote
The response is supposed to end with some kind of value that says "this is the end of the reply". You need to wait, in a while loop, for that character to arrive BEFORE you send another command.
I changed the wait time to 2000(2s),and it works well . but the result also have a little problem.
Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8); // RX, TX
void setup() 
{
 // Open serial communications and wait for port to open:
  Serial.begin(19200);
  // set the data rate for the SoftwareSerial port
  mySerial.begin(19200);
}

void loop() // run over and over
{
mySerial.println( "AT+CCLK =\"12/12/27,10:43:50+08\"");
   delay(500);
  if (mySerial.available())
    Serial.write(mySerial.read());
   delay(500);
mySerial.println( "AT+CCLK?" );
    delay(500);
    if (mySerial.available())
    Serial.write(mySerial.read());
   delay(500);
}
The result shows

AT+CCLK ="12/12/27,10:43:50+08"
OK

AT+CCLK?
+CCLK: "12/12/27,10:43:50+08"
OK

AT+CCLK ="12/12/27,10:43:50+08"
OK
AT+AAAAAAAAAAAAAAAAA


There also are many A .Can you tell me why does this happen?
thanks

9  Using Arduino / Programming Questions / Re: GPRS/GSM Shield Time Setting Problems on: December 31, 2012, 06:35:23 am
The following is  how did I program it with the Serial COM.
I program the with the following code.
Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8); // RX, TX
void setup()  
{
  Serial.begin(19200);
   // set the data rate for the SoftwareSerial port
  mySerial.begin(19200);
}
void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
Then I open the Serial COM tool. Program it
Code:
AT+CCLK ="12/12/27,10:49:50+08"
it returns OK,Then I program it
Code:
AT+CCLK?
it returns

+CCLK: "12/12/27,10:49:53+08"
OK


So the question is why I program the GPRS/GSM Shield with the first code, it will lost much data,And I program it through the Serial tool, the GPRS/GSM shield works fine. Is it because the Software library OVERFLOW?
10  Using Arduino / Programming Questions / GPRS/GSM Shield Time Setting Problems on: December 31, 2012, 02:52:39 am
I got a GPRS/GSM from http://www.elecrow.com/micro-controllers-c-109/shield-c-109_110/gprsgsm-shield-p-325.html .
Its Schematic is showed http://www.elecrow.com/download/ELE%20GPRSshield%20v1.0.pdf.
it works well when I program it with Serial COM .

but when I program the code to  Arduino, there are some problems.
it seems that it overflowed ,and some data lost.
The following code is what I upload to the Arduino.

Code:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(7, 8 ) ; // RX, TX
void setup()  
{
 // Open serial communications and wait for port to open:
  Serial.begin(19200);
  // set the data rate for the SoftwareSerial port
  mySerial.begin(19200);
}
void loop() // run over and over
{
mySerial.println( "AT+CCLK =\"12/12/27,10:43:50+08\"");
  if (mySerial.available())
    Serial.write(mySerial.read());
    delay(200);
mySerial.println( "AT+CCLK?" );
    if (mySerial.available())
    Serial.write(mySerial.read());
    delay(200);
}

The result is not acted as expected,the Serial COM shows like this :

AT+CCLK ="12/12/27,10:43:50+08"
OK
AT+CCLK?
+CCLK: "12/12AAAAAAAAAAAAAA


and the following  is a lot  A. That is to say,these data losts. Does anyone have the same phenomenon?
HOW CAN I DO WITH IT?  
Thanks!
11  General Category / General Discussion / Where can I get a PCB gerber file to test the ability of a PCB manufacturer on: December 29, 2012, 01:41:51 am
I find a new PCB manufacturer, they provide very great price service.and I want to test their ability to manufacture.
so I want to know where can I find  all-sided test gerber files.
thanks!
12  Using Arduino / Networking, Protocols, and Devices / Re: Cannot send SMS with SIM900 on: December 28, 2012, 09:13:21 pm
I see it at the SIM900_AT_Command_Manual_V1.03.pdf.page 218,it says that <code 765 > means <Invalid  input value>.
you can download this PDF here, http://www.elecrow.com/wiki/images/a/a8/SIM900_AT_Command_Manual_V1.03.pdf

So maybe you can change a micro-controller to have a try again, or some basic problems happened when operate the Arduino IDE.
13  Using Arduino / Programming Questions / Re: Time and SIM900 on: December 26, 2012, 05:51:14 am
It's really worked.
Thanks:)
14  Using Arduino / Programming Questions / Time and SIM900 on: December 26, 2012, 03:26:34 am
How can I set the time?
I watch the  SIM900_AT_Command_Manual_V1.03.pdf ,
and I find the write command is  AT+CCLK=<time> 
and the format is yy/MM/dd,hh:mm:ss+- zz
but I use this command AT+CCLK =<12/12/26,15:04:50+08>, it always returned ERROR

can anybody help me ?
15  Using Arduino / Networking, Protocols, and Devices / Re: Cellular Shield (Sagem HI-LO) - How to recieve a text? on: December 25, 2012, 09:05:52 pm
Maybe this will be help.
http://www.elecrow.com/wiki/index.php?title=GPRS/GSM_Shield_v1.0#Using_Sms_to_Control_an_LED_Status
Pages: [1] 2