Difference between revisions of "Blog 21"

From BitWizard Wiki
Jump to navigation Jump to search
(Created page with "This is used for both projects: Hardware used on Raspberry Pi: *[http://www.bitwizard.nl/shop/raspberry-pi-ui-16x2 RPi_UI board] | (User Interface) *[http://www.bitwizar...")
 
Line 12: Line 12:
*[[Bw tool]]
*[[Bw tool]]


== Getting the analog meters to work ==
== Connecting the analog meters ==




Line 34: Line 34:
IO1 + IO3 -> 02 + 08 = 0A
IO1 + IO3 -> 02 + 08 = 0A


== DIO Analog meter clock ==
=== Making the sticker ===












== DIO Analog meter clock ==





Revision as of 16:23, 14 December 2015

This is used for both projects:

Hardware used on Raspberry Pi:

Programmed with:

Connecting the analog meters

Change analog meter value through the command line

Recommended to use the DIO protocol.

I have in my example the analog meter connected with pin 3(IO0).

bw_tool -I -D /dev/i2c-1 -a 84 -W 30:01
bw_tool -I -D /dev/i2c-1 -a 84 -W 5f:01
bw_tool -I -D /dev/i2c-1 -a 84 -W 50:80

If you are going to use a pin like pin 10(IO6). With the value 40. The reason it is 40 is, because the bits are in hexadecimals. So, 64 decimal bits gets calculated to 40 hexadecimals.

The reason why this is getting used, is because it is bit masked. With that you can add multiple pins in the command. So, if you you want pin 4(IO1) and pin 6(IO3) on:

IO1 + IO3 -> 02 + 08 = 0A

Making the sticker

DIO Analog meter clock

DIO Cooking timer

Pin Function Value
3 IO0 01
4 IO1 02
5 IO2 04
6 IO3 08
8 IO4 10
9 IO5 20
10 IO6 40




Useful links