Meet The MakersJoin Team
.Connecting to the PycomIn order to connect to the Pycom you can follow our guide here
.Programming the Pycom
adc = machine.ADC()
apin = adc.channel(pin='P16')
val = apin()
Reading Pycom Data
After flashing code to the Pycom readings will start appearing roughly every second. The readings are based on the voltage on pin 16 of the Pycom. If no voltage or ground is currently connected to pin 16, random values will appear.
You can test the ADC values by connecting a resistor from Vin to pin16, like so
If working properly, you will most likely see a value of 4095 as this is reading directly from Vin.
You have now successfully used the ADC feature of the Pycom!
There are no project files yet.