Recommended ways to program Uno board

ep user

Jan 9, 2018
17
Joined
Jan 9, 2018
Messages
17
I know the basics of the Arduino Uno board, but need a way to generate it's code.

I would provide input info such as:
One 0-10V linear.
Two on/off.
One clock.

And output info:

Six 0-10V linear, labelled #1 through #6.

And logic description:

"When the first on/off is ON, and the second on/of is OFF, and the time is between 1 pm and 10 pm, and the 0-10V linear input is greater than 5V, then output #4 is 8V.

Does Arduino or anyone else provide a ways to do this?

Moderarors note : removed pale collor setting
 

Martaine2005

May 12, 2015
5,306
Joined
May 12, 2015
Messages
5,306
I know the basics of the Arduino Uno board, but need a way to generate it's code.
You don’t generate its code, you write it.
C or C++. But there are 10s of thousands already written on sites like Arduino or github. YouTube is a great source for Arduino programming. Even chatgpt will attempt writing your code.
Obviously, someone else’s code will need to be changed to exactly what you want.
 

danadak

Feb 19, 2021
1,093
Joined
Feb 19, 2021
Messages
1,093
The uno board cant generate 0-10V for starters. You would need to amp up a pwm or DAC output
for that purpose. Its 6 channels limited to 8 bit resolution.

An ESP32 can give you 6 PWMs, up to 20 bits, that you could use as DACs, but you have not stated any
needed accuracy/resolution specs for the analog side of things.

If you are not a programmer a good entry way is to do block programming.


I would consider blockly as one of the above to do the programming. Note ESP32 can do a web server as well,
so design could be managed over web or its Bluetooth capability.

You still need to gain up the PWM outputs, a OPAMP would manage that.
 
Last edited:

bidrohini

Feb 1, 2023
218
Joined
Feb 1, 2023
Messages
218
Tools such as Visuino or Flowcode can generate Arduino code from graphical logic, but the Uno cannot directly accept or output 0-10 V.

You will need a protected voltage divider for the input, a DS3231 clock module, and six DAC channels with 0–10 V amplifier stages. This ATmega328 analog I/O project shows how external ADC/DAC circuitry can interface an Arduino-compatible controller with +-10 V signals.

For an industrial application, a small PLC with native 0-10 V I/O may be simpler and safer.
 

ep user

Jan 9, 2018
17
Joined
Jan 9, 2018
Messages
17
Thanks. My example was not to spec, and was just to get the idea across. Since Uno is the only board I currently know, and my needs are very basic, I like the idea of Flowcode, seems the simplest.
 

thaohuyenvovan

Jul 10, 2026
3
Joined
Jul 10, 2026
Messages
3
Flowcode probably makes the most sense here if you want to keep things simple.

For the 0–10 V outputs, I wouldn’t try to do everything directly from the Uno. An external DAC and op-amp stage would make it much easier and give you cleaner analog outputs.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
14,296
Joined
Nov 17, 2011
Messages
14,296
For the 0–10 V outputs, I wouldn’t try to do everything directly from the Uno. An external DAC and op-amp stage would make it much easier and give you cleaner analog outputs.
There's no use in repeating what others have said before. Apart from that remark, it is not a matter of ease or cleanliness: an Arduino simply can't put out 10 V.
 
Top