Author Options:

How to run an Arduino Due for user defined time? Answered

i am using an Arduino Due for waveform generation on my Nokia lcd 5110 display.I want to generate the desired wave for a stipulated duration where time is taken as input .Kindly help me with this asap,also include code for the same if possible.


The forums are retiring in 2021 and are now closed for new topics and comments.

4 years ago

Although I don't program Arduino this sounds like -

Read analogue input - this is the time required.

Scale the reading as required.

do [generate wave form} until (time) loop.

in general if your program is anything except trivial (ie flash an LED) then you are better off making out an input/output table to define the I/O and then sketching out a flow chart. this is easily converted into any code you like.