RTL8722 from Realtek supports MicroPython and reading ADC values using Python script in 3 lines, here is an example
ADC read potentiometer:
• Materials: Ameba x 1, potentiomete x 1
• Steps:
Here we connect ameba to a potentiometer to measure its analogue value, the connection is as follows.
Copy and paste the following code into REPL.
from machine import ADC
a = ADC(0)
a.read()
Values will be obtained and printed on serial terminal once the last line code is executed.
ADC read potentiometer:
• Materials: Ameba x 1, potentiomete x 1
• Steps:
Here we connect ameba to a potentiometer to measure its analogue value, the connection is as follows.
Copy and paste the following code into REPL.
from machine import ADC
a = ADC(0)
a.read()
Values will be obtained and printed on serial terminal once the last line code is executed.