Search found 33 matches

by rpr
Tue Jul 23, 2019 12:58 am
Forum: ESP32 boards
Topic: esp32 internal temperature sensor
Replies: 1
Views: 54

Re: esp32 internal temperature sensor

The value is in deg Fahrenheit. import esp32 tf = esp32.raw_temperature() tc = (tf-32.0)/1.8 print("T = {0:4d} deg F or {1:5.1f} deg C".format(tf,tc)) That said, I saw this thread on github: https://github.com/espressif/arduino-esp32/issues/2422 , which mentions that this function is deprecated on n...
by rpr
Wed Jul 17, 2019 3:48 pm
Forum: ESP32 boards
Topic: main.py does not appear to working after boot
Replies: 47
Views: 747

Re: main.py does not appear to working after boot

Can you try a simple boot.py and main.py?

Edit to add: Can you use the

Code: Select all

 code 
block so that it can be easier to see the indentation?
by rpr
Wed Jul 17, 2019 6:42 am
Forum: Other Boards
Topic: MCUDev Black STM32F407VET6 + STM32F407ZET6 dev boards
Replies: 124
Views: 36373

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

See the main page (https://github.com/micropython/micropython). From the base MicroPython directory:

Code: Select all

$ cd mpy-cross
$ make
by rpr
Wed Jul 17, 2019 1:43 am
Forum: ESP32 boards
Topic: main.py does not appear to working after boot
Replies: 47
Views: 747

Re: main.py does not appear to working after boot

This maybe a silly suggestion. Put 'import main' as the last line of your boot.py. Or rename it as a different file.

Can you post your (redacted/reduced) boot.py and main.py scripts?

Edit: Other suggestions

Remove your 'boot.py' and just leave 'main.py' that blinks an LED.
by rpr
Thu Jul 11, 2019 11:46 pm
Forum: General Discussion and Questions
Topic: how fast is mycropython ?
Replies: 2
Views: 157

Re: how fast is mycropython ?

Thanks for that link. Very illuminating.

I tried those on my ESP32. The first two programs (led1, led2) ran slower than the pyboard, while the next two (led3, led4) ran a little faster. For obvious reasons, I could not run the native and viper demos.
by rpr
Thu Jul 11, 2019 1:37 pm
Forum: ESP32 boards
Topic: main.py does not appear to working after boot
Replies: 47
Views: 747

Re: main.py does not appear to working after boot

Have you tried a hard reboot when connected via rshell either pressing the button on the esp32 or doing a machine.reset()?
by rpr
Wed Jul 10, 2019 9:22 pm
Forum: ESP32 boards
Topic: main.py does not appear to working after boot
Replies: 47
Views: 747

Re: main.py does not appear to working after boot

Have you tried 1) power cycling the ESP32 directly or 2) tried to power down the Pi and restart as opposed to reboot? Maybe the reboot of the Pi is not disconnecting the power to the USB?
by rpr
Sun Jul 07, 2019 6:20 am
Forum: ESP32 boards
Topic: Rain Sensor (FC-37) with MicroPython
Replies: 2
Views: 170

Re: Rain Sensor (FC-37) with MicroPython

As @jimmo says, it is quite easy with micropython. Here is my code: from machine import Pin, ADC from time import sleep d = Pin(27, Pin.IN) adc = ADC(Pin(33)) adc.atten(ADC.ATTN_11DB) def loopreading(): while True: if d.value() > 0: x = "No Rain" else: x = "Rain" print(adc.read()," ",x) sleep(1) loo...
by rpr
Mon Jul 01, 2019 2:55 am
Forum: ESP8266 boards
Topic: machine.reset(0 output
Replies: 2
Views: 143

Re: machine.reset(0 output

jimmo -- thanks.
by rpr
Mon Jul 01, 2019 12:11 am
Forum: ESP8266 boards
Topic: machine.reset(0 output
Replies: 2
Views: 143

machine.reset(0 output

On my ESP32 when I do machine.reset() or press the RST button, I get readable output on my terminal. On the ESP8266, I gets unreadable characters. Any way to get readable output? I am using rshell with the default baud rate. Thanks.