Recommended ways to program Uno board

ep user

Jan 9, 2018
16
Joined
Jan 9, 2018
Messages
16
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,091
Joined
Feb 19, 2021
Messages
1,091
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.
 
Top