THANKS VERY MUCH
I use example chr(int('0A',16)) instead of chr(0x0a)
it works well!!
My English is poor
So only I can say: 'THANK YOU!!!'
Search found 8 matches
- Tue Mar 12, 2019 2:30 am
- Forum: ESP8266 boards
- Topic: send data via UART.wrtie
- Replies: 4
- Views: 3959
- Sat Mar 09, 2019 7:54 am
- Forum: ESP8266 boards
- Topic: send data via UART.wrtie
- Replies: 4
- Views: 3959
Re: send data via UART.wrtie
thanks
I test it,but it donot work for me
ps:
uart.write(chr(0x00)+chr(0x11)+chr(0x22))
this will work
but i donot know how to convert '00' to 0x00
I test it,but it donot work for me
ps:
uart.write(chr(0x00)+chr(0x11)+chr(0x22))
this will work
but i donot know how to convert '00' to 0x00
- Sat Mar 09, 2019 3:43 am
- Forum: ESP8266 boards
- Topic: send data via UART.wrtie
- Replies: 4
- Views: 3959
send data via UART.wrtie
hello every one
here I have a control cmd like cmd='010300000002abcd'
it will be send to a device via UART
in python2 i can UART.write(cmd.decode('hex'))
in python3 uart,write(bytes.frombyte(cmd))
but in micropython how to do?
here I have a control cmd like cmd='010300000002abcd'
it will be send to a device via UART
in python2 i can UART.write(cmd.decode('hex'))
in python3 uart,write(bytes.frombyte(cmd))
but in micropython how to do?
- Fri Nov 02, 2018 12:18 am
- Forum: ESP8266 boards
- Topic: when main.py Program error ,how to restart it
- Replies: 1
- Views: 1443
when main.py Program error ,how to restart it
main.py in programming
for some reason,it error
now main.py maybe in endless loop
in this time it seemed will not restart
how to do
main.py在运行过程中,在循环了几次之后 可能因为各种原因报错退出了
目前看到的就是,退出后不再执行任何程序
那么怎么做呢?让他重新运行起来
for some reason,it error
now main.py maybe in endless loop
in this time it seemed will not restart
how to do
main.py在运行过程中,在循环了几次之后 可能因为各种原因报错退出了
目前看到的就是,退出后不再执行任何程序
那么怎么做呢?让他重新运行起来
- Fri Nov 02, 2018 12:09 am
- Forum: ESP8266 boards
- Topic: esp8266 won't wake from sleep
- Replies: 8
- Views: 8056
Re: esp8266 won't wake from sleep
抱歉 我的英文是如此的匮乏,表达不来下面的意思
之前,我在程序启动时候初始化rtc 然后设置关于deepsleep的参数
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
rtc.alarm(rtc.ALARM0, deep_sleep_time)
这种情况下,在进入deepsleep之后不会醒来
但是当我把上面两行放到了程序结尾,在他后面就是
machine.deepsleep()
他顺利的工作了
之前,我在程序启动时候初始化rtc 然后设置关于deepsleep的参数
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
rtc.alarm(rtc.ALARM0, deep_sleep_time)
这种情况下,在进入deepsleep之后不会醒来
但是当我把上面两行放到了程序结尾,在他后面就是
machine.deepsleep()
他顺利的工作了
- Wed Oct 31, 2018 1:05 am
- Forum: ESP8266 boards
- Topic: esp8266 won't wake from sleep
- Replies: 8
- Views: 8056
Re: esp8266 won't wake from sleep
hi
I have this problem too
change power source did not solve it
use usb power or battery power it will not wake up too
I have this problem too
change power source did not solve it
use usb power or battery power it will not wake up too
- Fri Oct 12, 2018 1:17 am
- Forum: ESP32 boards
- Topic: about esp32 mcahine.RTC.irq
- Replies: 3
- Views: 3925
Re: about esp32 mcahine.RTC.irq
thanks very much it works well i have a new question about deepsleep it looks restart the programe when programe start i set some initialize value and device: for example: 1. oled screen it will spangled per restart ,for it need initialize i want to save some as global variables when programe first ...
- Thu Oct 11, 2018 12:58 am
- Forum: ESP32 boards
- Topic: about esp32 mcahine.RTC.irq
- Replies: 3
- Views: 3925
about esp32 mcahine.RTC.irq
hello everyone i want to use the follow code: import machine # configure RTC.ALARM0 to be able to wake the device rtc = machine.RTC() rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP) it tell me 'AttributeError: 'RTC' object has no attribute 'irq'' dir(rtc). it tell me: ['__class__', 'datetime', '...