This program communicates with UM34C via bluetooth. It can store UM34C's data in CSV file.
It was tested on Ubuntu 18.04 and on Raspbian (Raspberry Pi Zero W and 3b+).
- Install bluetooth library:
sudo apt install libbluetooth-dev
- Install ncurses library:
sudo apt install libncurses5-dev
- Install make:
sudo apt install make
- Install gcc:
sudo apt install gcc
- Open root folder of this project and build the program with:
make
- Stop running program by pressing:
CTRL+C
orc
- Once program is build/compiled type to start the program:
build/um34c
- Specify UM34C's bluetooth address (there is actually no need for this, program can search for UM34C device and than store its address in
um34c_addr.txt
for later usage (next time you run the program)):
build/um34c -a 00:15:A3:00:2D:BF
- Specify interval in which data from UM34C is queried (in ms) - default value is 500ms and minimal is 400ms. This example sets it to 1000ms which is 1s:
build/um34c -q 1000
- Start reading device on startup:
build/um34c -r
- Start reading device and saving data to CSV file on startup:
build/um34c -r -csv
- Append average from
x
samples of voltage and current to CSV file (in this case every average from 20 samples is appended to CSV file and becasue we set query interval to 500ms this means that every 10 seconds value is appended to CSV file):
build/um34c -f 20 -q 500
- Set record current threshold in cA (at which current measuring mAh and mWh starts). Here we set it to 5cA which is 0.05A:
build/um34c -i 5
- If GUI is not used (for example program runned in background) use
-n
flag, example of programm running in background:
build/um34c -f 4 -q 500 -r -csv -i 5 -n > /dev/null &
- To kill program like that run
ps aux | grep um34c
and thankill yourPID
where 'yourPID' is PID you got from command before.
- To kill program like that run
- Press
h
to display/close help - Exit application:
CTRL+C
orc
- Move to previous/next display:
LEFT
/RIGHT
- Toggle data sampling:
SPACE
- Toggle saving to CSV file:
s
- Rotate screen:
r
- Set device brightness:
- First press
b
- Than change brightness with
UP
/DOWN
- First press
- Set record current threshold (when recording (mAh and mWh) starts):
- First press
i
- Than change threshold with
UP
/DOWN
- First press
- Set screen timeout (
0
is OFF,9
is 9 min):- First press
t
- Than select timeout with
0
-9
- First press
- Set data group:
- First press
g
- Than select data group with
0
-9
- First press
Thanks to 'sebastianha' who inspired this project. Here is LINK to his project. There is also a lot of info on 'sigrok' website LINK.
If you have any suggestions please let me know.
Licensed under the GPLV3 License