Arduino TinyGPS no data - arduino

I am using the TinyGPS library and am trying to display information to get to a specific latitude/longitude via an LCD screen.
I am not getting any data. The output of directionto is "broke" and distanceto and bearingto is 0.
Code redacted
And here is what my pins/hardware look like: http://i.imgur.com/7iDBwxm.jpg
I am using an Arduino Uno, LCD shield and GPS shield by ITead Studio.
I am hoping it is either the pins or not having a GPS signal.
Reddit post: Arduino TinyGPS help

The baud rate for SoftSerial should be 9600.

You need to debug the system step by step to understand where the problem is.
I would start using only the serial monitor and no display.
Please note that when you switch on a GPS that has been moved for several hundred km, and the same is when you switch it on for the first time, may take a while to get the satellites and start giving out some data. Make sure you are in a open area and wait for 5 to 10 minutes before you declare it as "not working". The next time you will switch it on will be much quicker.
I have checked the documentation of your shield and what they also say is to make sure the Micro SD card you use is support SPI mode but not just the SD mode, also don’t forget to format it into FAT16 , and add a “datalog.txt” file on your card for Arduino to log the information.
Try that and then read the data on the sd card to make sure that is logging.
Come back with the outcome of the above tests and we will try to support you further.

Related

GPS module not showing useful information using Arduino

I have connected the GPS module with Arduino board, however, when I open the serial monitor, it shows a lot of empty fields and zeros. Is the GPS module faulty?
It shows this :
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000053.799,V,,,,,0.00,0.00,060180,,,N*43
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,000054.799,,,,,0,0,,,M,,M,,*4E
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,000054.799,V,,,,,0.00,0.00,060180,,,N*44
$GPVTG,0.00,T,,M,0.00,N,0.00,K,N*32
$GPGGA,000055.799,,,,,0,0,,,M,,M,,*4F
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
All this means is that your GPS doesn't have a fix yet.
A cold start on a GPS can take several minutes (like, up to 7 or so) to get its initial fix. Make sure the antenna is out in the open with a clear view of the sky.
Also, obviously, if your GPS unit has an external antenna, make sure it's connected properly. Those small coaxial connectors break easily!

How to get correct values from Arduino sensors

I am using 6 different sensors which are working simultaneously, but I got a problem in the readings from LM35 temperature sensor and MQ-7 Carbon Monoxide sensor. The values are changing depending on the power source.
How can I fix this problem? I'm planning to use a Sony power bank to feed my system but I am getting the wrong values especially from the temperature sensor.
Make sure that your power source is stable and continuous (i.e. make sure that your power bank is working fine and check its current output if its compatible with Arduino)
Make sure that your sensors are wired correct and working fine, try with different LM35 and MQ-7 sensors, if you have that chance.
Make sure that you are supplying your circuit with correct voltage and current, sensors may work unstable if you are supplying them directly from Arduino pins (because maximum current limit of the pins onboard may not be enough for your circuit), try an external power source such as MB102 power module.
Although, it's not a coding problem my suggestion is you can use signal conditioning to solved this. Search about low pass filter and high pass filter to filtering frequency in output sensor.
The simple method is using voltage divider, like this:
Vout = (R1/R1+R2) * Vin
R1 is your sensor, and R2 is resistor.

Sending output from arduino to picaxe

I am doing a class project involving an Arduino Uno and a Picaxe 14m2.
I am in the middle of attempting to code a program for the Arduino Uno that will allow me to send and output value to the input on the Picaxe.
So in layman's, this is what I wish to achieve:
I want the Arduino to check a sensor, and if the sensor returns a specific value. (- I know this part, but not the next.) I then want the Arduino to send a value (HIGH, or 1 .. something like that) as an output to one of the Picaxe input pins. I then need the Picaxe to notice a value has been sent, and then do something else.
Any help would be appreciated.
Thanks.
If you are looking for that, you may want to specify what kind of PICAXE you have.
Since there is a difference in the types of these chips.
After that you may wanna look over the datasheet of the PICAXE so that you can find the instructions set and the type of program memory you have, "EEPROM....".
After that:
List your Is/Os, inputs and outputs.
Set your source code editor.
Write the source code and burn it to the PICAXE program
memory.(C, Assembly...)
Write your Arduino code, setting the Is/Os and telling the
Arduino how to deal with the signals in and out.(C language)
Make a circuit diagram for the hardware you are going to connect
between both chips.
Don't forget to see the loading effects on both the Arduino and
the PICAXE, because you don't want to burn your project hardware
after all.
Test your project and note that you will have to troubleshoot
both software and hardware whenever a problem occurs.
I suggest that you use the Oscilloscope to test the signals going in or coming out of both circuits + the sensor's signal.
For any extra thing you need the PICAXE to do, use If statements, because they are not so technical to implement and they are easy to write and troubleshoot.
For your scheme, you are actually making the Arduino give instructions to the PICAXE through a variable signal coming from a sensor.
^send me feedback and I will help more.
You will probably want to look into using UART (aka Serial) or i2c communication.
Serial communication should work with any PICAXE and Arduino, While i2c Will only work if you are using the X2 Series PICAXE Chips. i2c's main advantage is when using multiple slave devices (plus the master device, i.e. more than just 2 devices total) in which you can use the same two wires for up to around 128 devices. Serial (UART) communication is simpler, and only needs one wire (plus a common ground) to send data one way, it is what i'll show for the rest of this answer
Here is the manual entry for serial input for the PICAXE, and Here's the entry for serial output from the Arduino. The code you will need given your question will be something like the following:
For the arduino:
void setup(){
Serial.begin(9600);
}
void loop(){
if (conditionMet){ //whatever the condition is in your code
int bytesSent = Serial.write(“HIGH”); //send the string “HIGH"
}
}
and for the PICAXE:
main:
serin 6, T9600, ("HIGH") 'uses qualifier to look for exact message "HIGH"
'do whatever when criteria met
goto main

How to control a stepper motor using Infrared IR Receiver?

Hi im new to Arduino Uno
My question is how to turn a stepper motor 90 dgree clockwise only when the infrared censored a something and turn anti-clockwise when the second infrared censored something is pressed again?
Stepper motor
Infrared transmitter/receiver pair
your help will be much appreciated
Thanks
Software and hardware my friend, software and hardware.
First, you'll need to connect your sensors to the Arduino and make sure you can read them reliably. You can write a sketch that outputs the values to the serial port and monitor them on your computer.
Second, you'll need to connect your motor. A stepper motor is going to need a driver, such as the "Adafruit Motor/Stepper/Servo Shield for Arduino v2 Kit" (link). This kit has sample code you can use to figure out how to drive the motor.
Then you'd connect these two independent pieces together. Write logic that puts the motor in one position when your sensor is sensing, and another when it's not, or use your second sensor to make the second motion.
Note: Stepper motors and the drivers are expensive and maybe not what you really want. For one thing, they use relative motion, not absolute position. If they miss steps (due to hitting something or being manually moved) then they remain in the wrong position until you fix them.
A cheaper and perhaps better solution is to use a hobby servo. They are cheap and use absolute positioning, which means that when you tell them to go somewhere they will always try to get to that position. Also, you can drive them directly from the Arduino without a driver board. One of the built-in Arduino sketches shows how to run them.

PIC or ARDUINO for servo motor controling

Im a PIC fan. I have not used arduino. but I have got a problems when Im going to control servos with pic.
1) when PIc is controlling the servo it cannot do enything else. so during that period it cannot get the sensor readings.
2) after driving the servo to a certain position and now when the pic is doing something else, the pic does not further more generate the pwm signal in the servo connected pin. so the servo may rotate back due to the load.
now my first question is will arduino genarate the pulse continously in the attached pin after the codes
servo s;
s.attach(13);
s.write(120);
or are there eny librarys to control multi servos using PIC in mikroc to avoid the above mentioned problems.
or is it better to use two PICs one to drive servos only and the other for processing and sensor reading, and connect them using I2C.
please I need help from an expert. please reply. thank you...
Yes the Arduino is able to generate the pwm continuously.
Arduino langage is C/C++ with some build in features like analogWrite()for pwm, which make it really easy to program.
Regarding your "when something is running, it can't do anything else" problem, that's one of the major limitation of the Arduino platform as is. You can overcome those limitations by using ISR (Interrupt Service Routine), timers and hardware interrupts.
If you're comfortable with C/C++, you can also use a Real Time Operating System (RTOS) which lets you run think like a regular operating system would: allow cpu time to each task so fast that they seem to run in parallel. But that's not as easy to use as the basic Arduino features, so think carefully if you really need those functions (scheduler, "multi-task", round rubin, etc.)
Hope it helps!
I am planning a similar project, using a PIC16F872, to control a servo motor. I am thinking of using a 32 kHz crystal to have a PWM suitable, of 35Hz and pulse width centred on 1.05 mS. In my case I will first be doing A/D measurements; then when required running the motor. The motor will have a continuous signal until a 'stop' switch gives an interrupt to the PIC.
I should mention that I have modified the servo for continuous running by disconnecting the feedback pot.

Resources