Search found 22 matches

by LukeVideo
Thu May 23, 2019 8:16 am
Forum: ESP32 boards
Topic: [SOLVED] imports issue
Replies: 5
Views: 2616

Re: imports issue

Thanks jimmo for the example.
i still don't really understand why my

Code: Select all

import foo

foo.bar()
returned foo isn't defined ???

Anyway it's all good now.

Thanks.
by LukeVideo
Wed May 22, 2019 9:16 am
Forum: ESP32 boards
Topic: [SOLVED] imports issue
Replies: 5
Views: 2616

Re: imports issue

well, i'm not sure why it didn't work. I'm not a python expert so i thought it might be because there a just functions in the file and no class ? So i should import the function from the file ? Anyway this works fine from ConnectWifi import connect connect() Is the usual import refere to a class nam...
by LukeVideo
Wed May 22, 2019 8:54 am
Forum: ESP32 boards
Topic: [SOLVED] imports issue
Replies: 5
Views: 2616

Re: imports issue

Oh... I was trying to import the file and not the functions within. So it works in repl but in a .py file you should import a class or a function not the file directly...
:oops:
by LukeVideo
Wed May 22, 2019 7:51 am
Forum: ESP32 boards
Topic: [SOLVED] imports issue
Replies: 5
Views: 2616

[SOLVED] imports issue

Hello again, I'm trying to import a module to connect to my wifi. i'm using a module because i don't want the ssid or password to be tracked on github :mrgreen: But it don't work in my main.py. In repl it works fine, I import ConnectWifi in both main.py and in the repl prompt and : connect to wifi T...
by LukeVideo
Wed May 22, 2019 7:32 am
Forum: ESP32 boards
Topic: [SOLVED] led to bright after Shift register
Replies: 3
Views: 2131

Re: led to bright after Shift register

Ok, thanks.
That means that less power is drawn out of the board. I was confused on the final result using so many resistors. Seems quite logic now that i think of it :lol:
by LukeVideo
Wed May 22, 2019 7:30 am
Forum: ESP32 boards
Topic: [SOLVED] external interrupts spam
Replies: 4
Views: 2434

Re: external interrupts spam

Thank you so much. I'll stay with a softwre based soltuion for now, but if my prototype (and skills evolve) i'll try a hardware based debouncing. I don't know why i assumed a reed switch wouldn't be so prone to debouncing. But again the fact that the rising edge has better behavior seems to confirm ...
by LukeVideo
Tue May 21, 2019 10:24 am
Forum: ESP32 boards
Topic: [SOLVED] led to bright after Shift register
Replies: 3
Views: 2131

[SOLVED] led to bright after Shift register

Hy all, The title may seem weird, So simple put, i am controlling 16 led's with to shift registers who are on 3.3 v. I added 16 resistors for the led's. But they are super bright and they are used as user interface and are really unpleasant to watch directly. So i tested a few resistor values and fi...
by LukeVideo
Tue May 21, 2019 9:48 am
Forum: ESP32 boards
Topic: [SOLVED] external interrupts spam
Replies: 4
Views: 2434

Re: external interrupts spam

I modified the code to print the pin in the callback and added a 0.1 second sleep in the while statement. It kinda works. The code : def callback(pin): print(pin) global interruptCounter interruptCounter = interruptCounter+1 reed = machine.Pin(39, machine.Pin.IN, machine.Pin.PULL_UP) reed.irq(trigge...
by LukeVideo
Tue May 21, 2019 9:18 am
Forum: ESP32 boards
Topic: [SOLVED] external interrupts spam
Replies: 4
Views: 2434

[SOLVED] external interrupts spam

Hy all, I'm having a little difficulty managing my external interupts on a bike counter project. I use a reed switch to count the number of rotations of the wheel with a external interupt on counter 0. I followed this post : https://techtutorialsx.com/2017/10/08/esp32-micropython-external-interrupts...
by LukeVideo
Thu May 09, 2019 8:25 pm
Forum: ESP32 boards
Topic: Gpio noob
Replies: 4
Views: 2179

Re: Gpio noob

Thanks Robeethh. I hope my next questions will be more challenging ;)
Now back to documentation !