Search found 9 matches

by BigStupidBeast
Mon Jul 13, 2020 11:45 pm
Forum: General Discussion and Questions
Topic: converting png file to bytearray
Replies: 31
Views: 33453

Re: converting png file to bytearray

Hello everyone. Playing with pbm in P4 is simple. BUT. If i have TRUE pbm in P1 i have some fun. I can write pbm file P1 # cool image 7 7 0001000 0011100 0111110 1111111 0011100 0011100 0011100 I can convert it into 1 string with open('arrow.pbm') as f: data_list = f.readlines() # for framebuffer [w...
by BigStupidBeast
Fri Jun 19, 2020 9:20 pm
Forum: Drivers for External Components
Topic: convert ds18b20 serial number
Replies: 7
Views: 9596

Re: convert ds18b20 serial number

kevinkk525 wrote:
Fri May 17, 2019 6:37 pm
Always funny when someone revives a thread that is a year old :D

The solution of converting a rom to string is quite simple: ''.join('%02X' % i for i in iter(rom))
Every year some nube like me ask something like
Can you take some sample of code? Pleeeeeesssee :roll:
by BigStupidBeast
Tue Jun 16, 2020 11:05 pm
Forum: ESP32 boards
Topic: How to invert part of screen? ssd1306
Replies: 0
Views: 1514

How to invert part of screen? ssd1306

Hello everyone)
I want to create something like this Arduino OLED gauge SSD1306

I creating a menu.
I have a white rectangle in the middle. When a text scrolls down and touches an edge of the rectangle, pixels in the letters should start invert one by one.
by BigStupidBeast
Tue Jun 16, 2020 8:50 pm
Forum: ESP8266 boards
Topic: ssd1306 oled: scroll repeats edge pixels
Replies: 6
Views: 4674

Re: ssd1306 oled: scroll repeats edge pixels

the problem is still not resolved
by BigStupidBeast
Sun Jun 14, 2020 10:39 am
Forum: ESP32 boards
Topic: how to use framebuf on ESP32
Replies: 2
Views: 2218

Re: how to use framebuf on ESP32

Hi. In new day with renewed vigour:) about code. That my logic. The screen works every time after "show()" comand. I hide my function in "display.py" file and call it only than i need it. The if __name__ == '__main__': here for quick control check what's wrong: wire or code. Incidentally the indenta...
by BigStupidBeast
Thu Jun 11, 2020 6:50 pm
Forum: ESP32 boards
Topic: how to use framebuf on ESP32
Replies: 2
Views: 2218

how to use framebuf on ESP32

Hello every one! stupid question how to use framebuf on ESP32? i have a manual and i have a simple code: from machine import Pin, I2C import ssd1306 def display(zuzu, scl_pin=22, sda_pin=21, oled_width = 128, oled_height = 64): #the list for "display" must contain data in format like (string, int, i...
by BigStupidBeast
Sun Jun 07, 2020 3:06 pm
Forum: ESP32 boards
Topic: DS18B20 wrong serial code/adress/roms
Replies: 5
Views: 3809

Re: DS18B20 wrong serial code/adress/roms

Looks like i'm a fool)) Yes. One 4.7K pull up resistor and it's alive! IT'S ALIVE!! Aaaand whats'up doc? then we use internal PULL_UP mode we pull up signal only for ESP. BUT! DS18B20 is microchip too. And the wire for little DS18B20 is like giant radio aerial. Maybe in my first sensor this problem ...
by BigStupidBeast
Sat May 30, 2020 8:46 am
Forum: ESP32 boards
Topic: DS18B20 wrong serial code/adress/roms
Replies: 5
Views: 3809

Re: DS18B20 wrong serial code/adress/roms

https://forum.micropython.org/viewtopic.php?f=2&t=8180&p=46521&hilit=ds18b20#p46528 maybe too many units on one bus? one sensor wired in normal mode (not parasite). positive power connected to 3.3V. the first sensor work with out pull up resistor. But China so diffrent China... I try to use inner p...
by BigStupidBeast
Thu May 28, 2020 5:49 pm
Forum: ESP32 boards
Topic: DS18B20 wrong serial code/adress/roms
Replies: 5
Views: 3809

DS18B20 wrong serial code/adress/roms

Hi. I have ESP23 dev kit with micropython firmware XX. I also have ds18b20 waterproof sensor (datasheet link: https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf I wrote this code for it: import time, onewire, ds18x20, machine from machine import Pin ds_pin=Pin(19) ds_sensor = ds18x20.DS18X20(o...