Probably you should raise an issue against my library (https://github.com/chrisb2/pyb_ina219/issues) if believe its wrong, rarther that further discussion in this old topic in a deprecated forum.
Chris
Search found 28 matches
- Tue May 02, 2023 9:01 am
- Forum: Drivers for External Components
- Topic: Micropython library for the TI INA219 voltage/current sensor
- Replies: 26
- Views: 202172
- Tue May 02, 2023 8:54 am
- Forum: Drivers for External Components
- Topic: Micropython library for the TI INA219 voltage/current sensor
- Replies: 26
- Views: 202172
Re: Micropython library for the TI INA219 voltage/current sensor
Can you tell me where in the datasheet for the ina219 (https://www.ti.com/lit/ds/symlink/ina219.pdf) you saw 2.5uV? I see 10uV in the Electrical Characteristics table on page 5 where it say 10uV in the DC Accuracy section.
Chris
Chris
- Thu Sep 16, 2021 7:31 am
- Forum: General Discussion and Questions
- Topic: Multiline f strings in v1.17 - syntax error
- Replies: 12
- Views: 8074
Re: Multiline f strings in v1.17 - syntax error
Based on the feedback I have updated my code to:
Code: Select all
def timestamp():
"""Get current timezone date/time from RTC as DD-MM-YYYY HH24:MM:SS."""
dt = datetime()
return f"{dt.day:02d}-{dt.month:02d}-{dt.year:d} " +\
f"{dt.hour:02d}:{dt.minute:02d}:{dt.second:02d}"
- Wed Sep 15, 2021 5:14 am
- Forum: General Discussion and Questions
- Topic: Multiline f strings in v1.17 - syntax error
- Replies: 12
- Views: 8074
Re: Multiline f strings in v1.17 - syntax error
This comes from my own code, where the following function is part of a module which talks to a DS3231 RTC: def timestamp(): """Get current timezone date/time from RTC as DD-MM-YYYY HH24:MM:SS.""" dt = datetime() return '%02d-%02d-%d %02d:%02d:%02d' % \ (dt.day, dt.month, dt.year, dt.hour, dt.minute,...
- Mon Sep 13, 2021 8:12 am
- Forum: General Discussion and Questions
- Topic: Multiline f strings in v1.17 - syntax error
- Replies: 12
- Views: 8074
Multiline f strings in v1.17 - syntax error
I have some existing string formatting I tried to convert to an f string, but it would be longer than the pep8 line size limit, so I tried to use a multiline string (as per solution 1 of https://izziswift.com/multiline-f-string-in-python/ ) as follows: x = 1 y = 2 a = ( f"{x}" f"{y}" ) but this give...
- Sun Jul 04, 2021 6:46 am
- Forum: Drivers for External Components
- Topic: Micropython library for the TI INA219 voltage/current sensor
- Replies: 26
- Views: 202172
Re: Micropython library for the TI INA219 voltage/current sensor
Seems like one option would be Circuitpython which has a ina260 library see:
https://learn.adafruit.com/getting-star ... cuitpython
https://learn.adafruit.com/adafruit-ina ... cuitpython
Chris
https://learn.adafruit.com/getting-star ... cuitpython
https://learn.adafruit.com/adafruit-ina ... cuitpython
Chris
- Thu May 21, 2020 8:25 am
- Forum: Drivers for External Components
- Topic: Micropython library for the TI INA219 voltage/current sensor
- Replies: 26
- Views: 202172
Re: Micropython library for the TI INA219 voltage/current sensor
I had a quick look at ina226 datasheet and it seems to me to be pretty similar to ina219, it might not be to hard to make appropriate changes to my library by carefully reading both data sheets. I would pay particular attention to the calibration algorithm. Micropython to Python should not be hard, ...
- Mon Mar 25, 2019 5:12 am
- Forum: ESP32 boards
- Topic: powering ESP32 with a battery
- Replies: 12
- Views: 19168
Re: powering ESP32 with a battery
The battery is https://www.jaycar.co.nz/18650-lifepo4-battery-1600mah-3-2v/p/SB2307 . You need a charger specifically designed for LiFePO4 batteries, the ordinary LiPo chargers will generate too high a voltage they are full at 4.2V, whereas LiFePO4 are full at 3.65V. My charger is an https://www.ali...
- Sun Mar 24, 2019 6:36 am
- Forum: ESP32 boards
- Topic: powering ESP32 with a battery
- Replies: 12
- Views: 19168
Re: powering ESP32 with a battery
I have had no problems with LiFePo4 batteries in this project: https://github.com/chrisb2/water-system Which uses a single directly connected battery. It wakes once a day and battery life seems to be about 3 months. The batteries I have have been recharged numerous times, even including recovering f...
- Sun Apr 22, 2018 8:28 pm
- Forum: ESP32 boards
- Topic: Wemos LOLIN ESP32 Lite Revision1 - All 6 analog pins?!?
- Replies: 5
- Views: 6798