My project is using GPRS and GPS shield. My board has 2 UART ports so there will be no problem when I use the 2 shields. My codes for both shields works fine alone, but when I already integrated the two in one board, the code for the GPS doesnt continue (GPRS works), its like stuck in this command
ptr = strstr(GPS_data, "$GPGGA"); //search GPGGA String
but this command runs perfectly if I only use the GPS shield alone with the board. Im using 2 baud rates, 57600 for GPRS and 9600 for the GPS. What could possibly be the problem for this? Thank you!
This is a part of my GPS code.
void SEND_data()
{
digitalWrite(gpsPin, HIGH);
Serial1.begin(9600); //GPS shield communication
pinMode(TX1, OUTPUT);
digitalWrite(TX1, HIGH);
Serial1.write(Serial1.read());
while(!ptr)
{
while(Serial1.available())
delay(10);
{
GPS_data[i]=Serial1.read(); //output of the GPS
i++;
j=0;
delay(10);
}
ptr = strstr(GPS_data,"$GPGGA"); //search GPGGA String
digitalWrite(gogoPin, HIGH);
}
digitalWrite(sendPin, HIGH);
My problem is that digitalWrite(sendPin, HIGH) above doesnt light anymore, so basically the running code stops in the part of the digitalWrite(gogoPin, HIGH); just above the bracket ({).
Your problem seems to be in fact a shield stacking problem. If you have bought your shields from same place as your Arduino board this is the case.
Seesntially, you have connected 2 devices to TX/RX pins which is not supported. Following post should explain it better Arduino Uno RX TX Pins.
Generally, in order to make it work, you have to rewire one of the shelds to use different pins and use SoftwareSerial library to communicate with them. This also means you cannot use stacking capability unless physically modifying one of your shields.
On a side note, you might want to use Electronics StackExchange site for futher questions regarding Arduino.
Related
As the title says its not giving me any errors when i build and run in code composer, but nothing happens on the baord. It even says the normal : "MSP430: Flash/FRAM usage is 84 bytes. RAM usage is 80 bytes." The code is below, should just light up leds in pattern. Straight from textbook, tried other code also.
#include <msp430.h>
void main (void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P2DIR = 0x18; // Set pins with LEDs to output, 0b00011000
P2OUT = 0x08; // LED2 (P2.4) on, LED1 (P2.3) off (active low!)
for (;;) { }
}
`
The compiler tells you how many bytes you code needs from the Flash and RAM Memory. But this output does not mean that, those byte have also been transfered to the chip.
So perhaps the easy answer is: After compiling the code you have to start the debugger which automatically transfers the programm to the chip's flash memory and starts it.
If you had done this already then, it could be possible that:
you have not chosen the right serial port (virtual USB to Serial?)
your driver (flash programmer over usb) is corrupt (Windows ?)
your MSP430 is RIP
if you use a lauchpad:
your lauchpad is damaged (especially the USB programmer part)
you removed the jumper that connect the USB Programmer with the chip' UART programming pins.
I've tried to connect two shields with my Arduino 1 R3.
The Shields are :
GSM with ICOMSAT 1.1 shield (http://imall.iteadstudio.com/im120417009.html)
GPS with Adafruit GPS shield (adafruit products:1272)
If I use these modules separated they works great, when I put them together GSM modules doesn't power on, status led shut down and is on only the power led.
I read a lot of forums and seems that the problem is the softwareSerial, so I tried these solution : http://forums.adafruit.com/viewtopic.php?f=25&t=38764&hilit=gsm+gps&start=15
=> using AltSoftSerial, making a bridge between pin 9 and RX of the GPS Shield, and cutting pin 7 from TX.
But it doesn't work.
This is a piece of code
#include <Adafruit_GPS.h>
#include <GSM.h>
#include <AltSoftSerial.h>
#define PINNUMBER ""
#define PMTK_SET_NMEA_OUTPUT_RMCONLY "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29"
#define PMTK_Q_RELEASE "$PMTK605*31"
#define PMTK_SET_NMEA_UPDATE_1HZ "$PMTK220,1000*1F"
//GPS
AltSoftSerial gpsSerial; //rx, tx (softwareSerial is called in GSM.H)
Adafruit_GPS GPS(&gpsSerial);
//GSM
GSM gsmAccess;
GSM_SMS sms;
void setup(){
Serial.begin(9600);
GPS.begin(9600);
...
}
void loop(){
...
}
If I put the switch of GPS Shield on "Direct", GSM power on, but I can't read GPS data.
First of all, you need to know you can't use two software serial at the same time. Secondly, the icomsat uses D8 and D9 as the software power control and reset, you shouldn't use D9 as software serial pins.
The best way to do it is to use iteaduino mega 2560, and iteaduino gps shield.
http://imall.iteadstudio.com/development-platform/arduino/arduino-compatible-mainboard/im120410003.html
http://imall.iteadstudio.com/im120417017.html
Connect icomsat to UART1, and connect gps to UART2.
You can tinygps library and gsm library for sim900, you can find the gsm library under useful links of icomsat website.
Best Regards!
Stan Lee
Hardware Engineer
Lizq#iteadstudio.com
You can create a working GPS and GSM system on Arduino R3 using AltSoftSerial and TinyGPSPlus.
Here is a link to a project doing this
http://www.mallinson-electrical.com/shop/gpsgsm
Hope this helps
I am looking at the pin-out here: http://www.ti.com/lit/ml/slau536/slau536.pdf and can't find p1.0 and p1.1. Where are they?
The reason (perhaps, stupid) why I started looking for these two pins is because I need to connect RX and TX of a UART somewhere on the launchpad, and p3.3 and p3.4 did not work, and on some loosely related pinouts of other boards such as this: http://energia.nu/Tutorial_DigitalReadSerial.html p1.1 is RXD and p1.2 is TXD (not sure what's the difference between RX and RXD, assuming for now they are the same). So I thought maybe I try these pins and try my luck there? And now I can't find them.
BTW, the pinout shows that p3.3 and p3.4 are UART RX and TX on BoosterPack standard, which I don't have, and on the launchpad these pins are UCA0RXD and UCA0TXT (also, they are apparently UCA0SOMI and UCA0SIMO). I don't know yet what these abbreviations mean, and also, why there are two sets of functions on the same pins and how to switch between them.
My launchpad (in subj) documentation says it supports up to 4 hardware UARTs. Where? And why then is there a UART on booster pack?
Maybe p1.1 and p1.2 are taken for the launchpad's onboard backchannel UART?
If you want to know where every pin goes on this board then you should look at the schematic in the User's Guide. But more importantly, you should get familiar with the datasheet for the microcontroller on the board.
You don't see P1.0 and P1.1 because those pins are not brought out to the booster pack headers (connectors). Those pins are used within the launchpad board for something else. (They are not even UART pins as you hoped.)
P3.3 and P3.4 is the only UART connection that you have available through the booster pack headers. The other UART is on P4.4 and P4.5 and those pins aren't brought out through the headers. So you should probably try to get P3.3 and P3.4 working. Did you download TI's example software for this launchpad? There is probably an example program that uses the UART.
P3.3 and P3.4 are multiplexed as are many GPIO pins on typical microcontrollers. These particular pins can be configured as GPIO, a UART, or an SPI port. SOMI and SIMO are abbreviations related to the SPI function. Your code will have to configure these pins for the UART function. Read the datasheet and study the example software to learn how to do this.
I'm not sure where you saw four UARTs. The microcontroller on this particular launchpad has four serial interfaces but only two of those interfaces are designed for UARTs. The other two serial interfaces can be SPI or I2C.
I have an Arduino Pro Mini and a USB cable with just wires from one side. Is it possible to connect these wires directly with Arduino? I mean, +Data to Rx, -Data to Tx, +5v to one of the numbered pins and ground to GND.
No, in fact you could damage your Arduino doing this.
The RX and TX pins are for Serial (which run at higher voltages than 5volts)
Your best option would be to buy a USB to Serial convetor and then use a MAX232 chip (it is a chip that converts TTL logic (5volts) to RS232 (3 to -25 volts).
Or you could try using the v-usb library. Google v-usb online.
Hope this helps.
Yes, but not as you think, there is a raw voltage and regulated voltage but why run the risk of wiring incorrectly.
The best is use USB device between FTDI.
Here is a simple pin connection to make programming easier in photos. (quality of photos may not be best but you get the idea from them) I don't show how I add the blue to the pins but that is shrink tubing heated.
This makes easier programming of your Arduino this can be attached to a programmer quickly and effectively.
You can get this from Sparkfun for very cheap FTDI
I have an antenova part no. M10382 that I am attempting to control with an Ethernet Arduino. I can get the unit to send packets over its USB channel but not over the UART channel. I have tried sending the unit CR/LF at 9600 baud with no result.
Has anyone used this module?
This GPS module is 3.3v, are you giving it 3.3v power and 3.3v on the GPS rx pin? You may have fried the module (or that pin) if you plugged it directly into the Arduino.
Once you have it wired correctly (3.3v), then try this excellent GPS library. Try the example code to debug your problem. You should only have to plug in 3.3v VCC, GND and finally the tx pin of the GPS into a digital input pin on the Arduino.
Good luck.