Sign in to follow this  
Followers 0
Hitaya

Help with Arduino

2 posts in this topic

Hi people, 

I have some questions for a small program i'm started to make in Arduino.

The program's overall picture is that when using the serial monitoring, u will be able to write "New User" or "List". If u type "New User" u will be able to write different user information down such as name and age, after where you can store the user. if u on the other hand type "List" u will be able to see the entire list of users there are stored. 

I'm not the best to Arduino, but I know the basic as string, arrays, loops and structs. 

Can anyone help me ?

 

Share this post


Link to post
Share on other sites

The serial works pretty much like an TERMINAL, but the functions are a little bit different

 

Since serial is a port used for communication, its latency is a bit high, and it probably doesn't raise an interrupt on the microcontroller. Therefore, the arduino can't listen to it constantly, like in a computer. So, you can't simply scanf() for a variable, but you can print(), since print is a output stream. Idk if I made myself clear, but whenever you are trying to read values from the serial, you will have to use other functions, rather than scanf(), from C.

 

Take a look: 

Please login or register to see this link.



You have some functions, like read()parseInt(), etc. Take a look! There are all the functions and working examples there. The documentation is always a great way to start.

 

Lemme know if you need further help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0