Search found 22 matches

by BigMan
Sat Jun 29, 2019 2:24 pm
Forum: General Discussion and Questions
Topic: ESP8266: instead of main.py start from REPL an script
Replies: 5
Views: 266

Re: ESP8266: instead of main.py start from REPL an script

jimmo wrote:
Sat Jun 29, 2019 11:47 am
Hi,

If you put your code in foo.py, then on the repl run "import foo", you should get what you want.

Also you can use Ctrl-D to soft-reset.
import foo.py <- that the solution and works! Thanks!!!
by BigMan
Sat Jun 29, 2019 2:24 pm
Forum: General Discussion and Questions
Topic: ESP8266: instead of main.py start from REPL an script
Replies: 5
Views: 266

Re: ESP8266: instead of main.py start from REPL an script

the main.py may be started but I cannot see any error messages while main.py is executed. There must be something wrong here. You should see error messages or anything else printed to stdout on the serial output while main.py is running. main.py will be executed automatically when the ESP8266 is po...
by BigMan
Sat Jun 29, 2019 11:32 am
Forum: General Discussion and Questions
Topic: ESP8266: instead of main.py start from REPL an script
Replies: 5
Views: 266

ESP8266: instead of main.py start from REPL an script

Hi, I do a lot of try-and-error coding. Means I write a main.py and flash it on the ESP8266 with ampy. The issue is: after rebooting the ESP8266, the main.py may be started but I cannot see any error messages while main.py is executed. It would be much better, if I access with picocom the REPL first...
by BigMan
Sat Jun 22, 2019 7:20 pm
Forum: General Discussion and Questions
Topic: Tuple as parameter for ifconfig / tuple parameters as variables
Replies: 1
Views: 87

Tuple as parameter for ifconfig / tuple parameters as variables

Hi, when I do this: self.sta_wlan.ifconfig(('10.0.0.34', '255.255.0.0', '10.0.0.10', '10.0.0.10')) my ESP8266 connects to my network with a fixed IP - as desired. But why is the following not working (I assume I am doing something wrong with the tuple): ip = '10.0.0.34' netzmaske = '255.255.0.0' gat...
by BigMan
Sun Feb 11, 2018 8:17 am
Forum: General Discussion and Questions
Topic: Sonoff / ESP8266: No REPL [SOLVED]
Replies: 4
Views: 1309

Re: Sonoff / ESP8266: No REPL [SOLVED]

After countless attempts of searching for the solution: Many thanks to the forum member "pythoncoder". It was not the 1st time, he gave me the hint, where to find the solution! Indeed, the solution can be found here: https://forum.micropython.org/viewtopic.php?f=16&t=3777 There, you find the answer ...
by BigMan
Sat Feb 10, 2018 2:41 pm
Forum: General Discussion and Questions
Topic: Sonoff / ESP8266: No REPL [SOLVED]
Replies: 4
Views: 1309

Sonoff / ESP8266: No REPL [SOLVED]

Hi, my Sonoff/ESP8266 is connected via an UART-converter to my Linux-PC (turned on while pressing the reset-button). Erasing the Flash: $ esptool --port /dev/ttyUSB0 erase_flash esptool.py v2.2 Connecting.... Detecting chip type... ESP8266 Chip is ESP8266EX Uploading stub... Running stub... Stub run...
by BigMan
Mon Jan 15, 2018 8:43 pm
Forum: General Discussion and Questions
Topic: MQTT connect: clean_seesion True and False
Replies: 1
Views: 543

MQTT connect: clean_seesion True and False

Hi, With my Sonoff's, I want to turn on/off my lamps. I believe, for that it is not necessary to store mqtt messages at the mqtt-broker. Hence, I connect to the broker with connect(clean_session=False) ... but this doesn't work. But, when I do connect(session=True), it works at least for many hours ...
by BigMan
Mon Dec 19, 2016 7:19 am
Forum: General Discussion and Questions
Topic: rtc.irq : can't convert function to int
Replies: 1
Views: 637

rtc.irq : can't convert function to int

By playing around, I try to understand more about time-interrupts. This is my code: import machine def alarm_handler(rtc_o): print("Hello from alarm_handler") rtc = machine.RTC() rtc.alarm(machine.RTC.ALARM0, 10000) rtc_i = rtc.irq(trigger=machine.RTC.ALARM0, handler=alarm_handler, wake=machine.idle...
by BigMan
Sun Dec 18, 2016 10:50 pm
Forum: General Discussion and Questions
Topic: RTC class - available methods
Replies: 2
Views: 1402

Re: RTC class - available methods

That documentation is for MicroPython on the WiPy board. The ESP8266 board has an RTC class too, but it's undocumented. I once noticed the discrepancies and wanted to update the documentation to match what is there on ESP8266 (the pull request is at https://github.com/micropython/micropython/pull/2...
by BigMan
Sun Dec 18, 2016 9:47 am
Forum: General Discussion and Questions
Topic: RTC class - available methods
Replies: 2
Views: 1402

RTC class - available methods

According to http://docs.micropython.org/en/latest/esp8266/library/machine.RTC.html , there is a Class RTC available in MicroPython. It seems this Class is in the Module machine. When I follow the example code from the link above (extented by import machine), it doesn't know the init() nor the now()...