From 006117f082a73c57560993cf4f7c7636ed594664 Mon Sep 17 00:00:00 2001 From: Efesykru <153976262+Efesykru@users.noreply.github.com> Date: Tue, 26 Mar 2024 03:19:31 +0300 Subject: [PATCH 1/2] Potasyometere --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 02ed062..3086015 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ -# Py \ No newline at end of file +#You must load the ssd1306.py library to your device POTASYOMETRE + +from machine import Pin, SoftI2C, ADC +import ssd1306 #the library +import time + +pot = ADC(Pin(36)) +pot.width(ADC.WIDTH_10BIT) +pot.atten(ADC.ATTN_11DB) + +i2c = SoftI2C(scl=Pin(22), sda=Pin(23)) +oled = ssd1306.SSD1306_I2C(128, 64, i2c) + +while True: + oled.fill(0) + oled.text("---Degrees---",15,0) + oled.text("pot: ",40,30) + oled.text(str(pot.read()),70,30) + oled.show() + time.sleep(0.1) From 730b65e3cc153e1a644e30e6e6c02e283a7a1ced Mon Sep 17 00:00:00 2001 From: Efesykru <153976262+Efesykru@users.noreply.github.com> Date: Tue, 26 Mar 2024 03:21:36 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index 3086015..8b13789 100644 --- a/README.md +++ b/README.md @@ -1,20 +1 @@ -#You must load the ssd1306.py library to your device POTASYOMETRE -from machine import Pin, SoftI2C, ADC -import ssd1306 #the library -import time - -pot = ADC(Pin(36)) -pot.width(ADC.WIDTH_10BIT) -pot.atten(ADC.ATTN_11DB) - -i2c = SoftI2C(scl=Pin(22), sda=Pin(23)) -oled = ssd1306.SSD1306_I2C(128, 64, i2c) - -while True: - oled.fill(0) - oled.text("---Degrees---",15,0) - oled.text("pot: ",40,30) - oled.text(str(pot.read()),70,30) - oled.show() - time.sleep(0.1)