I have an idea, looking for advice to get started

I am basically completely new to programming. I have a lot of experience with analog electronics, and experience with digital gates, and breadboarding. Knowing all that, I have been looking at the Arduino as a possible way to attact a project. The problem is I'm not even sure where to start. Most books I see seam to put a lot of emphasis on the hardware portion, which I am comfortable with. Hopefully someone can point me to some resources that can get me off the floor from a programming perspective.

So what I am trying to do it take two NMEA0183 sentences that are on the same serial port. Perform a simple math on a variable from each sentence, and output the value on a display. The display of my choice would be two 7-segment LED display. However I could live with an LCD if it was easier to start. The output value would never be larger than 90. I also would want an LED to signify positive or negative.

Thanks everyone that is willing to contribute, hopefully someone can at least confirm the Arduino should be able to meet my needs, and point me to some helpful resources to get started.

Brian

I would think that any Arduino would be able to do what you want. serial input basics will get you started with reading and parsing serial data. I think an I2C interfaced LCD will probably be the easiest display for a beginner.

Kb1cjp:
I am basically completely new to programming. I have a lot of experience with analog electronics, and experience with digital gates, and breadboarding. Knowing all that, I have been looking at the Arduino as a possible way to attact a project. The problem is I'm not even sure where to start. Most books I see seam to put a lot of emphasis on the hardware portion, which I am comfortable with. Hopefully someone can point me to some resources that can get me off the floor from a programming perspective.

So what I am trying to do it take two NMEA0183 sentences that are on the same serial port. Perform a simple math on a variable from each sentence, and output the value on a display. The display of my choice would be two 7-segment LED display. However I could live with an LCD if it was easier to start. The output value would never be larger than 90. I also would want an LED to signify positive or negative.

Thanks everyone that is willing to contribute, hopefully someone can at least confirm the Arduino should be able to meet my needs, and point me to some helpful resources to get started.

Brian

Are you making a latitude meter? An Arduino should be able to meet your needs. I have built a gps device using an Arduino clone called a Trinket Pro, and it does math on nearly all the nmea fields. I display the output on an OLED device, cause I think they look wild!
They also make 7 segment devices that use i2c for connection. Even 14 segment alpha-numeric devices.

As others have said any Arduino should be able to do what you want. My personal favorite for prototyping is the Nano as it can be inserted into your breadboard for easy connection and only requires a USB (type A to mini) cable to program. Can be found in either 3v3 or 5v versions which can be easier depending on what sensors you have.

As for getting into programming I'd suggest that when you get your arduino download the IDE and work through some of the examples that are included under File->Examples. These will take you from the most basic (blinky) to some quite advanced coding.

Some great suggestions. Will start digesting tomorrow night! A quick glance though the nano does look like a great form factor, thanks for suggesting, had not seen that yet. No I am not making a latitude meter. I am looking for a wind advantage meter. I want to take wind direction from the MWD sentence and subtract it from origin bearing to waypoint from the APB sentence. If the answer is greater then 90 subtract 180.,and display the answer as +/- 90. The reason for wanting an LED display is for size, cost, and visibility. I would like the display to be atleast 1" tall and visible in sunlight. An alternative to a display I could try to re write a new NMEA sentence with my data on it. It could be something like apparent wind angle. Feed this to a NMEA repeater display, select Wind angle which would really be my calculated value instead of actual wind data. Having so little programming knowledge is why this seams a little intimidating at the moment .

Brian

So I am getting close to purchasing a nano, here's a question. from what I can tell is the usb serial is the same as the serial port on the nano. So for development purposes, I might be better with a different board that effectively has two ports. One for the USB and the other with my 4800 baud NMEA. So I can actively monitor how the program is running two troubleshoot my programming. Is my statement correct? Does anyone have any further input?

Thanks ahead of time!

Kb1cjp:
So what I am trying to do it take two NMEA0183 sentences that are on the same serial port.

That is a strange way to describe two sentences from the same GPS device (how could one device be on two serial ports) which leads me to wonder if you mean two GPS devices. Then you really need two serial ports which would point to the use of a Mega.

Even if there is only one GPS device I would recommend an Arduino with a spare hardware serial port such as a Mega, Leonardo or Micro. With an Uno or Nano you could use SoftwareSerial for the GPS so as to leave HardwareSerial free for communicating with the PC. You cannot use 2 copies of SoftwareSerial to get two extra ports.

The Leonardo and Micro with the Atmega 32U4 do not always work as smoothly with the PC as the other Arduinos and I suggest a beginner steers clear of them if possible.

...R

I have sometimes programmed a Nano from the ICSP connector, which allowed me to connect my GPS to the hardware serial pins. But of course no USB in that case.

You can troubleshoot with software serial and then move it.

What @aarg says is perfectly possible. However I would advise a beginner to keep HardwareSerial free for debugging information.

...R

Kb1cjp:
So I am getting close to purchasing a nano, here's a question. from what I can tell is the usb serial is the same as the serial port on the nano. So for development purposes, I might be better with a different board that effectively has two ports. One for the USB and the other with my 4800 baud NMEA. So I can actively monitor how the program is running two troubleshoot my programming. Is my statement correct? Does anyone have any further input?

Thanks ahead of time!

none of the basic the arduino family have a debugging port. you have to get a special board that has, I think. a second processor. the arduino ZERO has Atmel’s Embedded Debugger (EDBG)
but most just use the one serial port on the NANO/UNO to show what is happening.

Something that might be worth considering is in an email I just got from Sparkfun - they have a blurb on the latest version of the "Bus Pirate" where they say: The Bus Pirate v3.6a is a troubleshooting tool that communicates between a PC and any embedded device over 1-wire, 2-wire, 3-wire, UART, I2C, SPI, and HD44780 LCD protocols – all at voltages from 0-5.5VDC. This product eliminates a ton of early prototyping effort when working with new or unknown chips. Using the Bus Pirate is simple and effective; type commands into a terminal on your computer, and those commands are interpreted by the Bus Pirate and sent via the proper protocol. I have not used it (and have no connection with them, but it sounds like it could be very handy as a way to get info for debugging etc. without needing a second hardware uart etc. Their link was Bus Pirate V3.6a I'm certainly going to consider adding it to my collection of tools.

Reading material.

https://www.google.com/search?num=100&domains=http%3A%2F%2Fforum.arduino.cc&q=NMEA+0183+site%3Ahttp%3A%2F%2Fforum.arduino.cc&oq=NMEA+0183+site%3Ahttp%3A%2F%2Fforum.arduino.cc&gs_l=serp.12...36996.36996.0.39788.1.1.0.0.0.0.69.69.1.1.0....0...1.1.64.serp..0.0.0.zrJxDa7teOM

@robin

I mean what i said. I want to take a piece of data off the MWD sentence and one off the APB sentence and perform some math and output the answer to a display. The data will be together on the same serial port coming out of one marine multifunction display.

If I am just using the hardware serial in port will i be able to monitor the status on the usb port? Or if it is in debug mode will the hardware port be tied up?

Kb1cjp:
If I am just using the hardware serial in port will i be able to monitor the status on the usb port? Or if it is in debug mode will the hardware port be tied up?

The USB serial "reads" (sends to the computer) what the Arduino is sending. So you can't monitor a GPS device because the data direction for that is in the Arduino receive direction. Not unless you echo the received characters.

So what you are going to need to do is request, read and parse from your GPS receiver - first one sentence, then the other sentence, extracting and manipulating your data as needed. I have a device that does this using software serial to communicate with the GPS, and the hardware serial to output the recomputed data (actually through the i2c bus to a display, but also) through the serial->usb.

You could get two inexpensive arduinos, connect the gizmo tx to both of them, using one arduino to do your display processing, and use the second arduino as an interface to the pc for monitoring the gizmo output.

Is it possiable for developing/testing, formulate the two nmea sentances i need on the pc and send them from the debugging software thru the usb port and be able to see how the Arduino processes the data?

What im trying to achieve from these questions is two things; am i buying the right Arduino, how much am i bitting off with my next to no programming skill.

The suppler i was going to buy from, but by no means locked into, is selling the UNO and the NANO. I like the hardware form factor of the nano alot from a development perspective. I have a nice big breadboard that it would snap right onto. If i was able to get this to work, my final plan would be to manufacture my own board. The Nano i am considering buying is part of a counter kit. It has 8 seven segment displays connected to the nano. Like i said in the first post i would be happy with two digit LED display.

What im trying to achieve from these questions is two things; am i buying the right Arduino, how much am i bitting off with my next to no programming skill.

Buy an arduino of any type and start developing your project. If you live in the US you can get an arduino delivered to your house for $4. Then you can working on your project and find the answer to your second question. If your gizmo output is rs232, you will probably need hardware to convert that to TTL for the arduino.

You will be able to learn basic Arduino programming in a week, and become proficient with your project in a month. Dig into the examples and keep at it! Ask lots of specific questions!

Kb1cjp:
@robin
I mean what i said. I want to take a piece of data off the MWD sentence and one off the APB sentence and perform some math and output the answer to a display. The data will be together on the same serial port coming out of one marine multifunction display.

Then connect the GPS using SoftwareSerial and use HardwareSerial for communication with the PC.

The 2nd example in Serial Input Basics should be suitable for receiving the messages from the GPS. There is also a parse example. If you want to find characters in the received data I think you use the function strstr().

Going back to "I mean what I said" - I think you missed the point that the way you said it was not clear. Indeed your reply still did not specifically state that you have only one GPS device, but I assume that is the case. :slight_smile:

...R