Search found 13 matches

by zmaier
Sun Sep 08, 2019 8:51 am
Forum: ESP8266 boards
Topic: webrepl is not working?
Replies: 4
Views: 184

Re: webrepl is not working?

One sleepless night later, i found the problem. boot.py -> main.py -> import run.mpy So my program is precompiled and is started with import run.mpy and here is the problem. Within run,mpy you have to call import webrepl webrepl.start() I had that code in boot.py :) Now everthing is working. But sti...
by zmaier
Sat Sep 07, 2019 9:09 pm
Forum: ESP8266 boards
Topic: webrepl is not working?
Replies: 4
Views: 184

Re: webrepl is not working?

I downloaded the repository, but my setup is not working :(
https://github.com/micropython/webrepl
by zmaier
Sat Sep 07, 2019 5:49 pm
Forum: ESP8266 boards
Topic: webrepl is not working?
Replies: 4
Views: 184

webrepl is not working?

Hello, i am using a wemos D1 Mini Pro with a HX711 and a DS18B20. Everey ten minutes data is send to a thingspeak and InfluxDB Server. So far, everything is working fine. But, i want to connect to the system via webrepl. The daemon is started : “WebREPL daemon started on ws://192.168.43.186:8266 Sta...
by zmaier
Thu Jul 04, 2019 11:42 am
Forum: General Discussion and Questions
Topic: read and delete only one line of a file?
Replies: 2
Views: 172

Re: read and delete only one line of a file?

Ok, thats a good workaround. I have enough room left, so this shouldn't be a problem.
I thought maybe there is a command which reads and deletes one line together.

THX
by zmaier
Thu Jul 04, 2019 7:36 am
Forum: General Discussion and Questions
Topic: read and delete only one line of a file?
Replies: 2
Views: 172

read and delete only one line of a file?

Hello,

Code: Select all

with open(infile,'r') as ifile:
   for line in ifile:
      <do something with line>
      if everthing is iO
         delete line in file
      else   
	 leave line in file         	
How can i do that without using readlines and writelines (since the file is too big for the mem).
by zmaier
Wed Jun 19, 2019 11:39 am
Forum: General Discussion and Questions
Topic: main.mpy is not executed?
Replies: 7
Views: 330

Re: main.mpy is not executed?

ok, this is a good point. An other thing, for example : I init the wifi in boot.py so the object is not visible inside app.run(). When i want to check whether wifi is connected or not with wifi.isconnected(), this is not possible, because wifi is not available? So i have to init the wifi inside the ...
by zmaier
Wed Jun 19, 2019 10:42 am
Forum: General Discussion and Questions
Topic: main.mpy is not executed?
Replies: 7
Views: 330

Re: main.mpy is not executed?

Ok is see, i tried it and the code will be executed.
But still a problem.
Because variables assigned in boot.py aren't available inside the imported code.

eg:
boot.py

Code: Select all

var='test'
main.py

Code: Select all

import abc
abc.py

Code: Select all

print(var)
NameError: name 'var' isn't defined
by zmaier
Wed Jun 19, 2019 10:02 am
Forum: General Discussion and Questions
Topic: main.mpy is not executed?
Replies: 7
Views: 330

Re: main.mpy is not executed?

Hi,

is the workaround really working?
the line "import app" dosn't execute the code inside app.mpy? It just imports functions inside the file, or?

I have to check that.
by zmaier
Wed Jun 19, 2019 6:55 am
Forum: General Discussion and Questions
Topic: main.mpy is not executed?
Replies: 7
Views: 330

main.mpy is not executed?

Hi, sorry for my english, i hope you understand what I am trying to explain :) i am using an Wemos D1 Mini Pro and my main.py file is to big to compile. I got a memory error (problem is well described here in the forum). So i am trying to get rid of that by pre-compiling it. I have the compiled main...
by zmaier
Tue Jun 18, 2019 12:57 pm
Forum: Programs, Libraries and Tools
Topic: [SOLVED] question on mpy-cross
Replies: 21
Views: 1127

Re: [SOLVED] question on mpy-cross

Hi, any change to get a running mpy-cross.exe compatilble with windows 64Bit?