• Система автоматизации с открытым исходным кодом на базе esp8266/esp32 микроконтроллеров и приложения IoT Manager. Наша группа в Telegram

run the file 'main.py' from Explorer

mimidbe

New member
I had some problems to run the file 'main.py' at boot of esp8266.
file 'main.py' is edited under ESPLORER, and transfered to the esp8266.
At RESET, it did not work.
the solution must be added an EOL ('\ n') to each line.
example:
import time\n
import machine\n
pin = machine.Pin(2, machine.Pin.OUT)\n

print('Hello world! I can count:')\n
i = 1\n

for i in range(10):\n
pin.low()\n
time.sleep(0.5)\n
pin.high()\n
time.sleep(0.5)\n
print(i)\n

so for the developper... could you automate this feature! Thank you in advance.
 
Сверху Снизу