Search found 27 matches

by misaalanshori
Tue Nov 12, 2019 1:09 pm
Forum: General Discussion and Questions
Topic: A way to detect button press?
Replies: 6
Views: 8592

Re: A way to detect button press?

This Code works (i had to invert the 1 and 0 but that shouldnt be the cause): from machine import Pin import time button = Pin(0, Pin.IN) def buttonPress(num): temp = num if (temp == 1) & (button.value() == 0): return 1 elif (temp == 0) & (button.value() == 0): return 2 elif (temp == 0) & (button.va...
by misaalanshori
Tue Nov 12, 2019 12:53 pm
Forum: General Discussion and Questions
Topic: A way to detect button press?
Replies: 6
Views: 8592

Re: A way to detect button press?

its been like 1 hour since i have this problem and I still can't seem to figure it out. It feel like its such a simple mistake but i just can't solve it. I even made another file and created a simple function that uses a variable from outside of the function and it works perfectly...
by misaalanshori
Tue Nov 12, 2019 11:25 am
Forum: General Discussion and Questions
Topic: A way to detect button press?
Replies: 6
Views: 8592

A way to detect button press?

Currently i have this code, but Im getting "NameError: local variable referenced before assignment" from line 6 about the "lastState" variable even though I already created the variable with value 0 before I call the function from machine import Pin button = Pin(0, Pin.IN) lastState = 0 #Variable cr...
by misaalanshori
Tue Nov 12, 2019 4:10 am
Forum: General Discussion and Questions
Topic: How do i fix "OSError: [Errno 110] ETIMEDOUT" on this code?
Replies: 5
Views: 24850

Re: How do i fix "OSError: [Errno 110] ETIMEDOUT" on this code?

Yes, the error happens when its trying to sync the time. So my solution was to put the syncing code in a "try:" and put "continue" in the "except:" so it just continues the loop and just tries again instead of stopping the program. There's probably a better solution but for now its good enough for m...
by misaalanshori
Mon Nov 11, 2019 11:29 pm
Forum: ESP32 boards
Topic: Wifi Sniffing on ESP32 with MicroPython?
Replies: 1
Views: 1455

Wifi Sniffing on ESP32 with MicroPython?

Is it possible to do wifi sniffing/promiscuous mode on the ESP32 using micropython? I found this https://github.com/cyberman54/ESP32-Paxcounter ESP32 Paxcounter and I want to try to replicate it but on micropython. And also just doing other things with the wifi like capturing packets, fake beacons, ...
by misaalanshori
Sat Nov 09, 2019 12:18 am
Forum: General Discussion and Questions
Topic: How do i fix "OSError: [Errno 110] ETIMEDOUT" on this code?
Replies: 5
Views: 24850

How do i fix "OSError: [Errno 110] ETIMEDOUT" on this code?

Here is the error: >>> import clock connecting to last APTrue Connection successful ('192.168.0.33', '255.255.255.0', '192.168.0.1', '192.168.0.1') OpenWrt Traceback (most recent call last): File "<stdin>", line 1, in <module> File "clock.py", line 4, in <module> File "ntptime.py", line 23, in time ...
by misaalanshori
Fri Nov 01, 2019 12:38 pm
Forum: Programs, Libraries and Tools
Topic: Create Menus on display (I2C SSD1306 OLED on ESP32)
Replies: 4
Views: 5716

Re: Create Menus on display (I2C SSD1306 OLED on ESP32)

also, do you know any way to scroll the framebuffer horizontally or vertically? I tried using framebuf.FrameBuffer.scroll() but I'm not sure what the correct arguments is.
by misaalanshori
Fri Nov 01, 2019 12:35 pm
Forum: Programs, Libraries and Tools
Topic: Create Menus on display (I2C SSD1306 OLED on ESP32)
Replies: 4
Views: 5716

Re: Create Menus on display (I2C SSD1306 OLED on ESP32)

I might try this, I already made my own menus but it looks ugly so might try this instead
by misaalanshori
Mon Oct 28, 2019 8:53 am
Forum: ESP32 boards
Topic: How do i get the full 16MB on the file system? ESP32
Replies: 19
Views: 13314

Re: How do i get the full 16MB on the file system? ESP32

for 16mb the size is changed to 0xE00000, but what about 4mb or 8mb? and how did you get these values?
by misaalanshori
Sun Oct 27, 2019 3:22 pm
Forum: Programs, Libraries and Tools
Topic: Create Menus on display (I2C SSD1306 OLED on ESP32)
Replies: 4
Views: 5716

Create Menus on display (I2C SSD1306 OLED on ESP32)

Are there any modules/libraries that could easily create Menus on displays? I'm planning to use a menu to execute my other python files on the storage. Currently, I'm using a web page to do this but its very slow since it has to connect to a wifi network and i would have to open the page to select w...