Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

13

The cheaper option is not always lower in quality. You can find items for sale on Amazon, Ebay and Aliexpress that all have the same "seller name" and a identical picture of the item. The price is usually 5 to 10 times higher on Amazon than Ebay. Aliexpress is usually the cheapest. During the past year, I've ordered over 100 Arduino related sensors/modules ...


6

The Neo 6M takes a bit of time to fix when first powered on. If your board is fitted with a small battery it will most probably be flat and will take an hour or two to charge up. It is there to provide charge to the EEPROM and the onboard RTC. Also check that the leads on the battery are not shorting. You do not get a valid data sentence out of the GPS ...


6

There is a simple way of power the module without pressing the button. There is pin call D9 at the bottom right corner of the module. Just power the pin by Arduino digital pin or 5v pin around 3, 4 seconds. Then it will power the whole module. No need to press the press switch. Make sure you connect power(9V-12V) to the board and provide 5V and GND to the ...


5

The speed value is correct, like TisteAndi said. Your GPS location "wanders" around the same way. You can simply ignore small speed values. One problem you may not be aware of yet: the printing isn't really coordinated with the GPS updates. Sometimes that doesn't matter, but if you want your speed to update every second, you'll need to synchronize the ...


4

"Is it possible to do it?" Well... everything is possible :-) "Does GPS require Internet connection?" GPS doesn't require internet. A GPS receiver (e.g. http://www.modulestek.com/prodts/GPS/Mars740-mini/Mars740-mini_SPEC.pdf) is connected to the reading unit via USB or a RS232 interface. The protocol is very simple. However it only provides latitude and ...


4

If you are finding Cheapest and working module you can you SIM800L less then 4$. aliexpress.com/item/Free-Shipping-Smallest-SIM800L-GPRS-GSM-Module-MicroSIM-Card-Core-BOard-Quad-band-TTL-Serial-Port/32708504554.html You can find many other cheap alternative but they does not work properly. Sim800 have good support and you can find many examples to use ...


4

The Haversine formula is way overkill for your needs. At the scale you are concerned about, the Earth is essentially flat, so the distance between two points is given by the standard Cartesian formula: d = √(Δx2 + Δy2) where Δx and Δy are the distances along the west–east and south–north axes respectively. These can be computed from the differences in ...


4

You're only reading from the serial port every GPSSearchPeriod milliseconds. That gives plenty of time for the small serial read buffer to overflow and lose the data. Instead you should be reading all the time regardless of your desire to only do things periodically. Sure, report the data periodically, but you must read all the time as well.


4

I think you are missing what the baud rate is. It is the speed at which the data is transmitted. So the fact that your two devices are the same is not an issue. It looks like from the code that your gps is connected to the hardware serial(pins 0,1 on uno) and the printer is on a software serial( pins 5,6) If this is the case, there is no reason to ...


4

No floating point for sprintf, it prints a '?'. The functions sprintf, sscanf and the alike functions (snprintf and others) do not have floating point support for avr microcontrollers. History One of the first Arduino boards used the Atmega8 microcontroller with only 8k flash and 1k sram. It was important to be very memory efficient. The gcc compiler did ...


3

This could be a general programming question. The only thing specific to Arduino here is that you may want a solution that minimizes the use of memory and avoids floating point operations. Here is a memory-friendly solution that reformats the string in place, i.e. it overwrites the original string. In many cases this is appropriate, as it is unlikely that ...


3

Not many possibilities (for the phone part, I suggest a GPRS/3G shield), but not wanting to discourage you, if you are thinking about "a fleet", forget about: low power (the phone radio needs power, some say you need > 1A for both Arduino plus the shield, depending on your distance to the antenna). you must add the GPS part. Even if you communicate just a ...


3

You can actually find all the information for what you want to do on the formal Arduino.cc website. They suggest a GSM shield: But of course you can find many other GSM shields for purchase. Most of them works the same. Arduino.cc also offer a nice GSM Library, with which you can perform HTTP GET/POST queries to a remote webserver (visible over the web). ...


3

Looking at the PDF for the Adafruit GPS shield, pin 7 is indeed hard wired to Rx and pin 8 is hard wired to Tx. These can not be changed. Looking at the guide for the Arduino GSM shield pin 7 is indeed reserved for modem reset: Digital pins 2, 3 and 7 are reserved for communication between the Arduino and modem and cannot be used by your sketches. ...


3

The Arduino Mega 2560 has three additional hardware serial ports. Why not use one of them instead? Serial1 on pins 19 (RX) and 18 (TX). void setup() { Serial.begin(9600); Serial.println("uBlox Neo 6M Test"); Serial1.begin(9600); } void loop() // run over and over { if (Serial1.available()) Serial.write(Serial1.read()); } Cheers!


3

You are consuming the received characters with the debug print: Serial.write(mySerial.read()); //gps.encode(mySerial.read()); if(gps.encode(mySerial.read())) Instead, do this: char c = mySerial.read(); Serial.write( c ); if (gps.encode( c )) Also, SoftwareSerial is a real CPU-killer. Try NeoSWSerial instead. It's much more efficient and reliable. ...


3

You have a version2 module. Use AT+CGNSxxx instead of AT+CGPSxxx


3

But when after setting the Longitude and Latitude to float.When I use this code, I don't get a valid gps data. Some statements in C/C++ are not what they might seem. The value of the statements: Longitude = (sim808.GPSdata.lon, 10 ); Latitude = (sim808.GPSdata.lat, 10 ); Are actually the same as: sim808.GPSdata.lon; Longitude = 10; sim808.GPSdata.lat;...


3

You forgot the , 8 from your println that specifies that it should print 8 decimal places. Instead you seem to have added it to the end of an assignment which makes absolutely no sense whatsoever. double latcord = gps.location.lat(); double lngcord = gps.location.lng(); Serial.println(latcord, 8); Serial.println(lngcord, 8);


3

I think others have addressed the need for you to modify the strip colors based on distance or bearing or... whatever you want to show. Here's a NeoGPS version of that sketch. I think it may be easier to understand what's going on, and where you need to focus: // Flora GPS + LED Pixel Code // Modified to use NeoGPS library. // // Adafruit Flora GPS ...


3

If something is too good to be true, it usually is. In all seriousness, going with a reputable shop (Adafruit, Sparkfun, Pololu) can save you a bit of headaches later, especially if you are doing integration. You might ask (email) the Pi Hut folks why you should buy from their place, rather than the other place, I'm curious what they would say. I don't ...


3

I designed a battery backup power supply for a product at my work. I included the INA219 current/voltage measurement chip. For the prototype run I bought that part from two Aliexpress sellers since the cost was half of what it would cost through our normal distributors. (two orders of 50) Half of the chips we way out of spec. Some would read current okay but ...


3

Most of the GPS modules keep on sending the data in the NMEA format whether they have a GPS fix or not, however, you can parse the GPS data to find whether the data is the latest data received from the GPS or not. If you look at the definition of the NMEA data here, there are a few variables in the data that you can use to find whether the data is the latest ...


2

Your uBlox LEA 6H is most likly configured to use the UBX binary protocol and not NMEA at all. This protocol, as well as how to switch your LEA 6H between NMEA and UBX is in this document, from the uBlox website: http://www.u-blox.com/images/downloads/Product_Docs/u-blox6_ReceiverDescriptionProtocolSpec_%28GPS.G6-SW-10018%29.pdf You may be able to use the ...


2

Assuming you're talking about the device with this schematic (or similar), the "analog" pins go directly to Atmel AVR I/O pins with no series resistance, so yes, it's quite possible to damage the microcontroller. Add some series resistance of a few K and you'll have a better chance of the part surviving such an event. The voltage on any pin should not, ...


2

You can use SoftwareSerial library in order to instantiate a second (soft) serial port. By looking at the example, it seems that you can use any two digital pins to use SoftwareSerial library and instantiate a second serial port along with the hardware serial port.


2

There doesn't seem to be, but what you could do is print each character as it arrives. From their example code: while (nss.available()) { if (gps.encode(nss.read())) // <--- pass to TinyGPS return true; } So, change that to be: while (nss.available()) { char c = nss.read(); // <--- get the incoming character Serial....


2

When I try to read data separately it works, but together it stuck every second (probably reading of gps data) and MPU6050 serial monitor sending FIFO overflow error . Yes, you have to be careful about the loop structure and "blocking" to "wait" for a new GPS speed report. SoftwareSerial also blocks everything else during each received character time. ...


2

Yes. Use SoftwareSerial for one of them. That way you can use any pins you like for that module. I'd recommend using the GPS module on the SoftwareSerial since it's (mainly) half duplex, and SoftwareSerial can't both transmit and receive at the same time like the hardware UART can. Either that or switch to a different Arduino board that has more than one ...


2

if (Serial.available() > 1) is wrong. Always use if (Serial.available()) in such cases. Also it seems you are communicating with the GPS shield using Hardware Serial. However, the Arduino also uses the same serial port for communicating with the PC via the USB connection. So what you have basically is: Arduino TX, PC RX and GPS RX are all connected ...


Only top voted, non community-wiki answers of a minimum length are eligible