UBISS2024exam: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
No edit summary  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
<syntaxhighlight lang="python" line='line'>import time  | <syntaxhighlight lang="python" line='line'>import time  | ||
from machine import Pin  | from machine import Pin, ADC  | ||
from time import sleep  | |||
while   | |||
y = ADC(Pin(26))  | |||
while True:  | |||
  z = y.read_u16()  | |||
  print(z)  | |||
  sleep(1)  | |||
</syntaxhighlight>  | </syntaxhighlight>  | ||
Revision as of 11:57, 13 June 2024
import time
from machine import Pin, ADC
from time import sleep
y = ADC(Pin(26))
while True:
  z = y.read_u16()
  print(z)
  sleep(1)