Search found 26 matches

by misaalanshori
Sat May 09, 2020 9:49 pm
Forum: ESP32 boards
Topic: Touch Pad error on the ESP32 Capacitive Touch Pins
Replies: 3
Views: 209

Re: Touch Pad error on the ESP32 Capacitive Touch Pins

From what I remember the value when not touched is around 600, and it usually drops to 100-200 when it is touched which is a pretty big difference and that is why I choose 400 as the "center" point. This is how I initialize the touchpad t1 = TouchPad(Pin(12)) t2 = TouchPad(Pin(14)) t3 = TouchPad(Pin...
by misaalanshori
Sat May 09, 2020 3:20 pm
Forum: ESP32 boards
Topic: Touch Pad error on the ESP32 Capacitive Touch Pins
Replies: 3
Views: 209

Touch Pad error on the ESP32 Capacitive Touch Pins

I've been playing around with the Touch Pins on the ESP32, but it looks like after using it for a while the script would stop because of a "ValueError: Touch pad error". The weird thing is that the error only happens when the touchpad is being touched, so my current workaround is to just return "Tru...
by misaalanshori
Sat Nov 23, 2019 2:06 am
Forum: Programs, Libraries and Tools
Topic: Can't get my NeoPixels to turn on
Replies: 26
Views: 1880

Re: Can't get my NeoPixels to turn on

So, I just erased my esp32 board (to test my led with arduino) and then flashed it with micropython again and now it works... Could it be caused by the cpu frequency? My boot file have machine.freq(240000000) on it and could that be the cause?
by misaalanshori
Thu Nov 21, 2019 11:00 pm
Forum: Programs, Libraries and Tools
Topic: Can't get my NeoPixels to turn on
Replies: 26
Views: 1880

Re: Can't get my NeoPixels to turn on

How do I fix the timing problems? do i have to change the cpu frequency?
by misaalanshori
Thu Nov 21, 2019 1:53 pm
Forum: Programs, Libraries and Tools
Topic: Can't get my NeoPixels to turn on
Replies: 26
Views: 1880

Re: Can't get my NeoPixels to turn on

so I found a neopixel Arduino library that works with an esp32 and it works first time, with 5v, on gpio pin 5... so it shouldn't be hardware related...
I still want to get this to work with micropython so what other troubleshooting steps should I do next?
by misaalanshori
Wed Nov 20, 2019 10:42 pm
Forum: Programs, Libraries and Tools
Topic: Can't get my NeoPixels to turn on
Replies: 26
Views: 1880

Re: Can't get my NeoPixels to turn on

I don't think I have anything that can output 4v, but a tutorial that I was following said that I should be able to just connect 5v to the led board directly and a GPIO pin to the DIN... maybe I should try to upload an Arduino example code to the board to make sure that the led board is not defective?
by misaalanshori
Wed Nov 20, 2019 3:16 pm
Forum: Programs, Libraries and Tools
Topic: Can't get my NeoPixels to turn on
Replies: 26
Views: 1880

Can't get my NeoPixels to turn on

I have a WS2812 Neopixel stick with 8 leds, I connected the "DIN" to GPIO5, but i can't get it to light up at all. Im not sure if its my code, the led board, the esp board that is causing it Heres the code: import machine, neopixel pin = machine.Pin(5) np = neopixel.NeoPixel(pin, 8) np[0] = (255, 0,...
by misaalanshori
Tue Nov 12, 2019 1:16 pm
Forum: General Discussion and Questions
Topic: A way to detect button press?
Replies: 6
Views: 479

Re: A way to detect button press?

Thank you so much, everything works as expected now!
by misaalanshori
Tue Nov 12, 2019 1:13 pm
Forum: General Discussion and Questions
Topic: A way to detect button press?
Replies: 6
Views: 479

Re: A way to detect button press?

Ohh, thanks for the explanation!! this has confused me for way too long, I just expected it to just be able to modify a global variable because I can read it so why couldn't I modify it...
by misaalanshori
Tue Nov 12, 2019 1:09 pm
Forum: General Discussion and Questions
Topic: A way to detect button press?
Replies: 6
Views: 479

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...