Search found 11 matches

by thoralt
Sat Apr 04, 2020 11:14 pm
Forum: MicroPython pyboard
Topic: [Solved] Pin.mode() throwing TypeError
Replies: 4
Views: 915

Re: Pin.mode() throwing TypeError

Unfortunately that's not the documentation for the class you're using. You're using "pyb.Pin", but that's the docs for "machine.Pin".
That explains everything. Thank you for clarifying! :)
by thoralt
Fri Apr 03, 2020 4:20 pm
Forum: MicroPython pyboard
Topic: [Solved] Pin.mode() throwing TypeError
Replies: 4
Views: 915

Re: Pin.mode() throwing TypeError

Wouldnt it be pir = Pin('X1', Pin.IN) This does indeed work and I have used it before. I guess my question was a bit misleading: I do know how to initialise a pin's direction using Pin(...) but I wonder why I am not able to set the pin direction using the .mode() method (as per the documentation). ...
by thoralt
Fri Apr 03, 2020 2:37 pm
Forum: MicroPython pyboard
Topic: [Solved] Pin.mode() throwing TypeError
Replies: 4
Views: 915

[Solved] Pin.mode() throwing TypeError

Dear forum, I stumbled across a strange behaviour of MicroPython on my PyBoard v1.0: I want to switch the GPIO mode of a pin and had a look at the corresponding documentation (https://docs.micropython.org/en/latest/library/machine.Pin.html). I tried my best, but the PyBoard insists on me doing it wr...
by thoralt
Sun Mar 20, 2016 5:16 pm
Forum: ESP8266 boards
Topic: New *early access* mp-esp8266-firmware-vXY.bin on ESP8266
Replies: 49
Views: 24340

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

I did some more testing of the Neopixel module. I used the module with the pyBoard before and it was driving my word clock (114 WS2812B LEDs) really stable. Now I moved parts of the code to the ESP8266 and there are some glitches in the signal. My code is calling NeoPixel.write() with constant data ...
by thoralt
Sat Mar 19, 2016 5:36 pm
Forum: ESP8266 boards
Topic: Current documentation v. github repository
Replies: 10
Views: 4957

Re: Current documentation v. github repository

[...] may not match the actual available functionality at this stage of development? The functionality _is_ available in the alpha versions of the firmware which were shipped to certain Kickstarter backers (depending on how much you donated). It is not yet available in Github, but the Micropython f...
by thoralt
Fri Mar 18, 2016 8:16 am
Forum: ESP8266 boards
Topic: New *early access* mp-esp8266-firmware-vXY.bin on ESP8266
Replies: 49
Views: 24340

Re: New mp-esp8266-firmware-vXY.bin on ESP8266

I've played around with alpha 2 a bit and focused on the Neopixel module. I'm running Micropython on an ESP-07 and the chip is driving all LEDs correctly on GPIO0, GPIO2, GPIO4, GPIO5, GPIO12, GPIO13, GPIO14 and GPIO15. However, it is _not_ outputting any data on GPIO16. I verified this by using a s...
by thoralt
Sun Mar 13, 2016 9:09 am
Forum: ESP8266 boards
Topic: New *early access* mp-esp8266-firmware-vXY.bin on ESP8266
Replies: 49
Views: 24340

Re: New mp-esp8266-firmware-v01.bin on ESP8266

So, is there any way of having our own code run on startup now? I'm in a chicken-and-egg situation now, as I would like to put "import boot_" in "boot.py" to have it run on startup, but "boot.py" won't be run without importing "boot_" first... I second that. Do we have the possibility to run own py...
by thoralt
Fri Mar 04, 2016 9:45 am
Forum: General Discussion and Questions
Topic: [Solved] RTC module behaving differently in REPL and main.py
Replies: 2
Views: 1777

Re: RTC module behaving differently in REPL and main.py

dhylands wrote:Your main.py example is missing the parenthesis on the call to pyb.RTC It should be pyb.RTC()
Now that is embarrassing :oops:

Fixed it, works as expected. Thanks a lot, Dave!

Thoralt
by thoralt
Fri Mar 04, 2016 8:48 am
Forum: General Discussion and Questions
Topic: [Solved] RTC module behaving differently in REPL and main.py
Replies: 2
Views: 1777

[Solved] RTC module behaving differently in REPL and main.py

Dear forum users, I need your help. I stumbled across an issue which I'm not able to sort out. I'm trying to use the RTC module and therefore visited its documentation page. When I type the example code into the REPL console, everything works as expected: >>> rtc = pyb.RTC() >>> rtc.datetime((2014, ...
by thoralt
Wed Jul 02, 2014 11:40 am
Forum: General Discussion and Questions
Topic: Playing with Interrupts
Replies: 21
Views: 16397

Re: Playing with Interrupts

from http://micropython.org/doc/tut-switch : Note that your callback functions must not allocate any memory (for example they cannot create a tuple or list). Callback functions should be relatively simple. If you need to make a list, make it beforehand and store it in a global variable (or make it l...