Search found 2639 matches

by Roberthh
Fri Apr 30, 2021 1:19 pm
Forum: Raspberry Pi microcontroller boards
Topic: Error when importing custom python module
Replies: 9
Views: 375

Re: Error when importing custom python module

I should specify that the error is received FROM the board, so i was thinking if i should compile the file using mpy-cross before uploading it to the board
There should not be a difference between using .py or .mpy files, besides import time.
by Roberthh
Fri Apr 30, 2021 1:17 pm
Forum: Drivers for External Components
Topic: Driver for SCD30 CO2 Sensor
Replies: 7
Views: 989

Re: Driver for SCD30 CO2 Sensor

a) did you connect the SEL pin of the sensor to GND?
b) the baud rate must not exceed 50000. The default is 100000. So try a lower baud rate, like 10000.
c) according to the data sheet the internal pull-up of the sensor is 45k. That works only with short cables
by Roberthh
Fri Apr 30, 2021 12:38 pm
Forum: Raspberry Pi microcontroller boards
Topic: Error when importing custom python module
Replies: 9
Views: 375

Re: Error when importing custom python module

Working with emacs and elisp, nothing should frighten you. I prefer using the mpr.py (with pyboard.py) script for copying files to the on-board file system. You can surely add a shell command into emacs. pyboard.py is at https://github.com/micropython/micropython/tree/master/tools, and mpr.py is sti...
by Roberthh
Fri Apr 30, 2021 11:31 am
Forum: Raspberry Pi microcontroller boards
Topic: Error when importing custom python module
Replies: 9
Views: 375

Re: Error when importing custom python module

That's indeed strange. I am using this mechanism regularly. Can you show a simple version of your code which shows the error? And you do use an IDE like Thonny? The latter may may hide whether files are permanently uploaded to the target or not. For verification use a simple terminal emulator like P...
by Roberthh
Fri Apr 30, 2021 6:08 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico Micropython overclocked twice (250MHz) works fine
Replies: 12
Views: 1595

Re: Pico Micropython overclocked twice (250MHz) works fine

I do not know of a specific firmware.250MHZ.uf2. You set the frequency with the generic v1.15 firmware at each startup, like in main.py. So add to main.py:

import machine
machine.freq(250_000_000)

If you look through the forum, you will also find hints to use even higher frequencies.
by Roberthh
Wed Apr 28, 2021 11:25 am
Forum: Programs, Libraries and Tools
Topic: Every time the device restarts, the random number is a fixed value
Replies: 9
Views: 471

Re: Every time the device restarts, the random number is a fixed value

It is a definition in mpconfigport.h which has to be changed. The new value is:

#define MICROPY_PY_URANDOM_SEED_INIT_FUNC (esp_random())
by Roberthh
Wed Apr 28, 2021 9:26 am
Forum: ESP32 boards
Topic: PWM on ESP32
Replies: 3
Views: 249

Re: PWM on ESP32

The 74hc14 is an inverter, not an oscillator. It just inverts the polarity of a signal. You may use it to build an oscillator, but that is not the primary application.
by Roberthh
Tue Apr 27, 2021 8:21 pm
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 45
Views: 1900

Re: UART not working with today's version of micropython

Thank you for raising that question. That brought me to change my test. The problem with duplicate characters being sent disappears if the instantiation of the UART is made in the thread that finally uses the UART. So if you move the UARt set-up to core1 as well, then the problem may be gone. P.S.: ...