Read value PWM on 18
I followed https://onion.io/2bt-hardware-pwm-omega2/ that explain that omega can emit a pwm signal but I cannot find a way to read it.
I don't want to use the PWM expansion to read only a potentiometer :-(
As I can see the electronic works because a led connected change the lights but I cannot find a command or a way to read the value from omega.
Someone has a suggestion?
I enabled that pin but https://docs.onion.io/omega2-arduino-dock-starter-kit/arduino-kit-reading-a-pot.html is for Arduino and in the forum I cannot find any tutorial.
It is very difficult to find examples about PWM without Arduino stuff :-(
@Daniele-Scasciafratte Onion Omega2 Arduino Dock Starter Kit Reading a Potentiometer
The LED is connected to Digital pin 9. Dimming an LED with PWM (digital) signal is Digital Analog conversion.
The potentiometer is connected to Analog pin 0 - the input of an Analog Digital converter - so this is Analog Digital conversion.
On Omega2 PWM Channel 0 (GPIO18) and PWM Channel 1 (GPIO19) are outputs, the generated PWM signal is an outgoing digital signal. Omega2 doesn't have analog pins / analog inputs (Analog Digital converters).
For AD conversion (eg. reading a potentiometer value) you should use - for example - an ADC Expansion or the Arduino Dock 2 (or some third party device ;).
I was trying to avoid to use the Arduino dock (that I have) :-/
Maybe the ADC expansion is the only option.
Thanks for the reply :-)