Hello! I am not sure if this is the right forum, and apologies if something is phrased strangely. I have a project I would like to try to do on an Arduino:
I have several sets of serial data that I would like to be stored, create an interface where you can select which set of serial data you would like, and have it send the data back out. This serial data contains information simulating the satellites used in GPS and will be used by a different device (that I already have and works) that reads the information to simulate the motion of what is being tracked and finds its coordinates, for context.
Specifically, I need to be able to store the data, have the ability to send the data through a serial port, and attach a screen or use a computer or something to be able to select what will be sent. I am assuming if this is possible, it would not be difficult to add a feature to pause or stop sending data, or go back and select a different simulation to run.
I know very little about the actual capabilities of this kind of microcontroller. Is doing something like this possible, and how difficult would it be to achieve this? I have some Java coding experience and do think I will know how to handle the hardware to an extent, but I am brand new in anything Arduino related. I have seen code that parses serial data into something readable for people, but have been unable to find anything that will send data back out.
These files may end up being somewhat large, or at least there are multiple so it will for sure require more than 20 kB. I will try using an SD card in that case, looks like there is a lot of information out there about it so that should be fine.
If I understood what I read, the SD card is not easy to physically remove from the Arduino once attached, but it is possible to write (and overwrite) new data to it, correct?
On a practical note, basic Arduino like Uno, Nano, Pro Micro have only one serial port, which is used for uploading code from the PC and sending output such as debug information back to the PC. That makes it difficult to use the serial port for sending out your messages to other devices with these types Arduino.
You can use "Software Serial" to emulate an extra serial port on these types of Arduino, but there are limitations in terms of speed (baud rate) and other limitations. These may not be an issue in practise, I'm not sure.
There are other types of Arduino which have more than 1 serial port. Mega has another 3 serial ports. Pro Micro and Leonardo have another 1 serial port, so it may be wise to consider using one of these. I generally recommend Pro Micro because it is breadboard compatible, which makes building your prototype easier. However, you may be able to find a read-made "shield" with display, buttons and perhaps even an SD card, which provides everything you need. In that case, a Mega or Leonardo would be the choice, but check first that the shield is compatible with that type of Arduino and does not physically block the use of the extra serial port.
kasi3598:
If I understood what I read, the SD card is not easy to physically remove from the Arduino once attached, but it is possible to write (and overwrite) new data to it, correct?
Not sure what you read that says removing the SD card is difficult. Yes, the Arduino can both read from and write to the card, or you can remove it and do that on the PC.
kasi3598:
If I understood what I read, the SD card is not easy to physically remove from the Arduino once attached, but it is possible to write (and overwrite) new data to it, correct?
No. Why would it be difficult to pull the card out?
The Arduino can read and write to the card. But it cannot act like a regular storage drive on the PC. So to easily copy/edit/delete files it is usually better to take the card out and insert it in the PC.
Re what I said about the SD cards earlier, I ended up misunderstanding something from a quick Google search about adding an SD card and for whatever reason assumed there isn't anything for the SD card to plug into, read too fast haha. Makes sense.
PaulRB:
You can use "Software Serial" to emulate an extra serial port on these types of Arduino, but there are limitations in terms of speed (baud rate) and other limitations.
I'll attempt it, don't remember what baud rate is needed for the other devices but I'll try regardless.
I generally recommend Pro Micro because it is breadboard compatible, which makes building your prototype easier. However, you may be able to find a read-made "shield" with display, buttons and perhaps even an SD card, which provides everything you need.
Thanks for the recommendations, I'll spend some time looking into this. Pro Micro sounds pretty good. A shield also looks useful, thanks for mentioning those because I didn't know anything like that existed.
kasi3598:
Thanks for the recommendations, I'll spend some time looking into this. Pro Micro sounds pretty good. A shield also looks useful, thanks for mentioning those because I didn't know anything like that existed.
Be sure to post a link on here before you buy. We can check you are not wasting your money.
You can't fit a shield on a pro micro. You might be able to fit one on a Leonardo, but there could be compatibility issues if the shield is designed only for Uno. This is why I don't like shields.
kasi3598:
I know very little about the actual capabilities of this kind of microcontroller. Is doing something like this possible,
My first reaction is that a RaspberryPi may be more suitable and easier to program for what you want.
An Arduino is great when you want to operate hardware (such as a servo, or stepper motor) or collect data - for example reading temperature sensors. They are also great for real-time projects where interruptions by the operating system cannot be tolerated - for example driving a 3D printer.
PaulRB:
Be sure to post a link on here before you buy. We can check you are not wasting your money.
You can't fit a shield on a pro micro. You might be able to fit one on a Leonardo, but there could be compatibility issues if the shield is designed only for Uno. This is why I don't like shields.
I appreciate it, I will respond again (or create a new thread, depending) once I familiarize myself with the Arduino I have with simpler projects + decide what to buy. I believe I have an Uno, but for now I'll just worry about getting the software to work before playing with a screen etc. if it won't work with that one.
Robin2:
My first reaction is that a RaspberryPi may be more suitable and easier to program for what you want.
I thought so too but we don't have a Raspberry Pi and someone had already ordered the Arduino, so figured I would might as well try it with what I was given.
My project, to put it more specifically, is to be used to provide information for flight simulations in place of a positional simulator. We figured it would be best to simply record its serial data and create selections of simulations we'd previously created, put it on the Arduino, then use it to send the data to our other device that actually displays the information it receives and shows it processed for if it is possible to fly at X elevation in a certain area, what airspaces it is passing through, and so on (already programmed and not gonna be a part of the Arduino's code). I'm aware this is more software based, so you're probably right that it won't be as easy with this.
It's currently more of a "let's see if we can do it" type of project, so as long as it's possible I'm set to try to learn. If it ends up being far too difficult, I'll try something other than a microcontroller.
kasi3598:
I thought so too but we don't have a Raspberry Pi and someone had already ordered the Arduino, so figured I would might as well try it with what I was given.
To my mind the simplicity of using an RPI will easily outweigh the extra cost - but you are the person making the decision.
Of course another option is a spare laptop that might be lying around unused.