Search found 22 matches

by BigMan
Sun Dec 18, 2016 8:44 am
Forum: General Discussion and Questions
Topic: Module names with and without a "u"
Replies: 1
Views: 1855

Module names with and without a "u"

In the Micropython documentation, I find very often similar modules which seems to have only a different names. E.g. there is a module utime and time. What is the story behind that?
by BigMan
Sat Dec 17, 2016 9:40 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 5263

Re: Sonoff: IRQ on push-button

changed: while pinSchalter == 0: to: while pinSchalter() == 0: ahh ... how could I oversee that. Sure. Now, I changed it to >>while pinSchalter.value() == 0:<< and it basically work. (I am only still getting the Message "NameError:" when I press it less than 2Sec. But perhaps it is related with ano...
by BigMan
Sat Dec 17, 2016 8:04 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 5263

Re: Sonoff: IRQ on push-button

On my wipy1, I can run this: # on wipy1 import micropython micropython.alloc_emergency_exception_buf(100) import time from machine import Pin #pinRelay = machine.Pin(12, machine.Pin.OUT) #pinSchalter = machine.Pin(0, machine.Pin.IN, machine.Pin.PULL_UP) pinRelay=Pin('GP16');pinRelay.value(1);pinRel...
by BigMan
Sat Dec 17, 2016 4:00 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 5263

Re: Sonoff: IRQ on push-button

Boiled down, should if zeitschleifer >= 100:, not be if zeitschleife >= 100: My bet. uppp ... yes this is a mistake. But even after I fixed this, it is still not working. Updated code: def umschalten(p): zeitschleife = 0 time.sleep_ms(500) while pinSchalter == 0: if zeitschleife >= 100: machine.res...
by BigMan
Sat Dec 17, 2016 12:12 pm
Forum: General Discussion and Questions
Topic: Sonoff: IRQ on push-button
Replies: 6
Views: 5263

Sonoff: IRQ on push-button

Hi, I was able to flash a Sonoff device with MicroPython. This Sonoff should switch a lamp on/off. Everyhing works fine and now I want to implement a back-up function, in case my wlan is not available. The idea is to make use of the push-button on the Sonoff. I was already able to define it as an in...
by BigMan
Sat Dec 17, 2016 10:31 am
Forum: General Discussion and Questions
Topic: Robust / (un)stable WiFi connection
Replies: 0
Views: 1699

Robust / (un)stable WiFi connection

Hello, with the following code I can successfully establish a WiFi connection between my ESP8266 and my home Wlan. def WLan_verbinden(SSID, passwort): sta_wlan = network.WLAN(network.STA_IF) if not sta_wlan.isconnected(): sta_wlan.active(True) sta_wlan.connect(SSID, passwort) while not sta_wlan.isco...
by BigMan
Wed Nov 23, 2016 4:57 pm
Forum: ESP8266 boards
Topic: ESPLORER unable to run a proper main.py file ...
Replies: 21
Views: 22294

Re: ESPLORER unable to run a proper main.py file ...

update: okay, an upload of a file from ESplorer to the ESP8266 is really not working fine. Although ESPlorer wrote a file to the ESP8266 it was empty (I checked with f=open('<filename>'), f.read() -> Results ''). So I gave rshell a try: well I can connect to my ESP8266 and even access repl ... but h...
by BigMan
Mon Nov 21, 2016 6:05 pm
Forum: ESP8266 boards
Topic: ESPLORER unable to run a proper main.py file ...
Replies: 21
Views: 22294

Re: ESPLORER unable to run a proper main.py file ...

If main.py is in the root directory, it will start. Do you see it, when in REPL you issue: import uos uos.listdir() I will double-check the day after tomorrow, and will post the results (currently I am bit to busy with the work I am getting paid for :-)) The pymakr source code is here: https://gith...
by BigMan
Sun Nov 20, 2016 2:24 pm
Forum: ESP8266 boards
Topic: ESPLORER unable to run a proper main.py file ...
Replies: 21
Views: 22294

Re: ESPLORER unable to run a proper main.py file ...

Hello together, I have the same issue as ym58 ... well ... pls. excuse ... but I am not fully "happy" with the replies. 1) ESPlorer is uploading the main.py on the ESP8266. The file is there. Based on the micropython documentation I thought main.py files would be automatically executed after the ESP...
by BigMan
Sun Oct 30, 2016 7:48 am
Forum: Programs, Libraries and Tools
Topic: MQTT: c.connect() -> IndexError: bytes index out of range
Replies: 7
Views: 9365

Re: MQTT: c.connect() -> IndexError: bytes index out of range

Issues with MQTT should be raised against micropython-lib, so look there too. [/url]. hmmm ... I cannot follow you (maybe because I am not a native english speaker, and new to Python). "Raised against micropython-lib" -> where exactly should I look for what? Issues with MQTT should be raised agains...