That explains everything. Thank you for clarifying!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".
Search found 11 matches
- Sat Apr 04, 2020 11:14 pm
- Forum: MicroPython pyboard
- Topic: [Solved] Pin.mode() throwing TypeError
- Replies: 4
- Views: 3162
Re: Pin.mode() throwing TypeError
- Fri Apr 03, 2020 4:20 pm
- Forum: MicroPython pyboard
- Topic: [Solved] Pin.mode() throwing TypeError
- Replies: 4
- Views: 3162
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). ...
- Fri Apr 03, 2020 2:37 pm
- Forum: MicroPython pyboard
- Topic: [Solved] Pin.mode() throwing TypeError
- Replies: 4
- Views: 3162
[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...
- Sun Mar 20, 2016 5:16 pm
- Forum: ESP8266 boards
- Topic: New *early access* mp-esp8266-firmware-vXY.bin on ESP8266
- Replies: 49
- Views: 46677
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 ...
- Sat Mar 19, 2016 5:36 pm
- Forum: ESP8266 boards
- Topic: Current documentation v. github repository
- Replies: 10
- Views: 9416
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...
- Fri Mar 18, 2016 8:16 am
- Forum: ESP8266 boards
- Topic: New *early access* mp-esp8266-firmware-vXY.bin on ESP8266
- Replies: 49
- Views: 46677
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...
- Sun Mar 13, 2016 9:09 am
- Forum: ESP8266 boards
- Topic: New *early access* mp-esp8266-firmware-vXY.bin on ESP8266
- Replies: 49
- Views: 46677
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...
- 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: 3101
Re: RTC module behaving differently in REPL and main.py
Now that is embarrassingdhylands wrote:Your main.py example is missing the parenthesis on the call to pyb.RTC It should be pyb.RTC()
Fixed it, works as expected. Thanks a lot, Dave!
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: 3101
[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, ...
- Wed Jul 02, 2014 11:40 am
- Forum: General Discussion and Questions
- Topic: Playing with Interrupts
- Replies: 21
- Views: 26914
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...