Search found 3667 matches

by Roberthh
Wed Sep 07, 2022 7:55 pm
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 430253

Re: BMP280 / BME280 uPython

I updated the repository. Should be:

Code: Select all

        self._l1_barray[0] = self._mode_temp << 5 | self._mode_press << 2 | MODE_SLEEP
by Roberthh
Wed Sep 07, 2022 7:02 pm
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 430253

Re: BMP280 / BME280 uPython

Must be n >>= 1.
by Roberthh
Wed Sep 07, 2022 1:00 pm
Forum: Other Boards
Topic: MicroPython on Mini SAM M4
Replies: 11
Views: 36497

Re: MicroPython on Mini SAM M4

Thanks for staying on focus. In the last days I made a few additions to the Development branch at my repository, especially: adc.read_timed_into(buffer, freq) dac.write_timed(buffer, freq [, count]) Both methods use a hardware timer and DMA for data transfer, so the timing is precise and does not in...
by Roberthh
Tue Sep 06, 2022 7:34 pm
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 430253

Re: BMP280 / BME280 uPython

Could be like that below. The driver requires for oversampling the log2 + 1 of the number. x1: 1 x2: 2 x4: 3 x8: 4 x16: 5 That is calculated with the log2i() function. def log2i(n): result = 1 while n > 1: result += 1 n >>= 1 return result #bme280 sensor addresses bme0_i2c_address = 0x77 bme1_i2c_ad...
by Roberthh
Tue Sep 06, 2022 12:34 pm
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 430253

Re: BMP280 / BME280 uPython

I updates as well my variant of the BME280 driver at https://github.com/robert-hh/BME280. The bme280_int.py version is based on the same driver as the one you use, with a small bug fix in processing the calibration data. But that has only rarely a minor effect on the results.
by Roberthh
Tue Sep 06, 2022 11:58 am
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 430253

Re: BMP280 / BME280 uPython

So I have a modified code here. It can be loaded. But I cannot tell if it works, since I have given away my BME280 sensor. The mode parameter is now either a single int or a tuple of three ints with (mode_hum, mode_temp, mode_pressure). # Authors: Paul Cunnane 2016, Peter Dahlebrg 2016 # # This modu...
by Roberthh
Mon Sep 05, 2022 7:48 pm
Forum: Raspberry Pi microcontroller boards
Topic: BMP280 / BME280 uPython
Replies: 45
Views: 430253

Re: BMP280 / BME280 uPython

The driver can easily be modified. If you change the API to supply a tuple of 3 values for oversampling instead of a singe value, these values can be sent to the chip. There seems to be only a single place where that happens.
by Roberthh
Thu Sep 01, 2022 1:54 pm
Forum: ESP8266 boards
Topic: 2 concurrent while true loops?
Replies: 3
Views: 33668

Re: 2 concurrent while true loops?

Basically the board runs a single task, and boot.py and main.py run sequentially. To get more that a single task handled, you have at least two options: 1. Threading. That allows to start additional tasks which run in parallel to the first task. Therading uses exhausting multiprocessing. 2. Aysncio,...
by Roberthh
Wed Aug 31, 2022 9:18 am
Forum: ESP32 boards
Topic: How boot mode in esp32 adafruit huzzah32
Replies: 1
Views: 20326

Re: How boot mode in esp32 adafruit huzzah32

The feather board has the espressif boot loader logic. So esptool.py will switch the device into bootloader mode automaitically, Strange enough, GPIO0 seems not to be connected to the board's pin headers.
by Roberthh
Sun Aug 28, 2022 9:41 am
Forum: Other Boards
Topic: [teensy41] help getting started
Replies: 8
Views: 29018

Re: [teensy41] help getting started

You should be able to write:

mpremote connect /dev/cu.usbmodem14401 mount .

or whatever the port name is.