Search found 3667 matches
- Sat Oct 15, 2022 6:35 am
- Forum: Programs, Libraries and Tools
- Topic: uPing - Ping library for MicroPython
- Replies: 29
- Views: 120258
Re: uPing - Ping library for MicroPython
Hardly. The returned value is a tuple. So not need to append. You can directly index into it. result = uping.ping('google.com', quiet=True) if result[1] != 0: print(f"\n\nUping successfull, returned {result[1]} of {result[0]} packets sent.") # or do_something() else: print(f"\n\nUping UNSUCCESSFULL,...
- Mon Sep 26, 2022 1:45 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: Pico Mounting SD Card
- Replies: 41
- Views: 204291
Re: Pico Mounting SD Card
No. One would use flush() in a sequence of writes to ensure, that all data from the cache has been written, but the file should be kept open for further writes.
- Mon Sep 26, 2022 1:34 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: Pico Mounting SD Card
- Replies: 41
- Views: 204291
- Fri Sep 23, 2022 8:46 am
- Forum: General Discussion and Questions
- Topic: Reading encoder with interrupts
- Replies: 7
- Views: 33210
Re: Reading encoder with interrupts
What is a hard interrupt? Does it mean it's a higher priority than the other ones? With an pin IRQ defined with the option hard=True the callback runs in interrupt context, in contrast to the 'normal' pin irq, where the callback runs as regular scheduled task. The callback in interrupt context can ...
- Thu Sep 22, 2022 12:28 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: help function for bm180
- Replies: 3
- Views: 35130
Re: help function for bm180
You can as well use one of the existing driver to learn from. Another driver: https://github.com/robert-hh/BMP085_BMP180
- Thu Sep 22, 2022 12:23 pm
- Forum: General Discussion and Questions
- Topic: Reading encoder with interrupts
- Replies: 7
- Views: 33210
Re: Reading encoder with interrupts
You did not mention the pulse rate of the encoder. So it's hard to tell whether interrupt is lagging. But in any case a IRQ should terminate as fast as possible. You said the you have a hall sensor encoder. That one should create clean pulses without bouncing. But if the pulse rate is faster than th...
- Wed Sep 14, 2022 11:31 am
- Forum: Raspberry Pi microcontroller boards
- Topic: Pi Pico W and ST7789 display problem
- Replies: 3
- Views: 31249
Re: Pi Pico W and ST7789 display problem
These lines ate not valid Python statements. They look more like comments. So add the comment char.
- Mon Sep 12, 2022 7:16 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: BMP280 / BME280 uPython
- Replies: 45
- Views: 444445
Re: BMP280 / BME280 uPython
The BME280 should go into sleep when not requested. So as long as you do not poll too often, at least the temperature reading should be stable. About humidity I have my doubts. I did a series of humidity tests a while ago, exposing a range of sensors to controlled humidity by placing them in a close...
- Thu Sep 08, 2022 6:37 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: BMP280 / BME280 uPython
- Replies: 45
- Views: 444445
Re: BMP280 / BME280 uPython
The scaling factor of 100 have be related to different physical units. The driver returns the basic values, °C for temperature, % for humidity and Pa for pressure. The usual numbers in weather reports are hPa or hectoPascal, which is by a factor of 100 (hecto) lower than the Pa number. 1 hPA = 100 P...
- Thu Sep 08, 2022 6:05 am
- Forum: Raspberry Pi microcontroller boards
- Topic: BMP280 / BME280 uPython
- Replies: 45
- Views: 444445
Re: BMP280 / BME280 uPython
The float version of my driver return the values in the proper range. So these lines are not needed, if you use the float version of the driver:
Code: Select all
at0 = t0/100.0
ap0 = p0/25600.0
ah0 = h0/1024.0
at1 = t1/100.0
ap1 = p1/25600.0
ah1 = h1/1024.0