I set out to connect a water flow sensor to my bbb. 
The water/gas sensor is " G3/4 Water Flow Sensor Switch Hall Effect Flow 
Meter Counter 1-60L/min"
When water flow in the given direction you will get a pulse. 5.5 pulses , 
mean 1L passed the sensor.

You connect one pin to +5V one to GND and the middle to a GPIO.
This GPIO pin should be pulled up to the "high" voltage , the GPIO is set 
to. in our case its 3.3V
So I wanted to use the on-board GPIO pull-up feature.

RobertCNelson maintains a kernel for the BBB and he released the 
3.19-rc3-bone2. This kernel has a new way to define the device tree.
You need to define the GPIO to use a pull-up using the device tree.
I first got the debian image and flashed the BBB. Here is how 
https://blog.fite.cat/2014/03/upgrade-beaglebone-black-to-debian-7-4-and-kernel-3-14/

I then installed the new kernel from here: 
https://rcn-ee.net/deb/jessie-armhf/v3.19.0-rc3-bone2/

I then got dtb-rebuilder from 
https://github.com/RobertCNelson/dtb-rebuilder/tree/3.19.x:
git clone https://github.com/RobertCNelson/dtb-rebuilder.git



I then used the example by Derek Molloy to define the GPIO pullup : 
https://github.com/derekmolloy/boneDeviceTree/blob/master/overlay/DM-GPIO-Test.dts

I got this file and saved it under the directory of dtb-rebuilder under the 
sub-dir src/arm as DM-GPIO-Test.dtsi
I then edit the file am335x-boneblack.dts and add this line at the end of 
the file:

#include "DM-GPIO-Test.dtsi"



Then from the dtb-rebuilder directory I ran, make , then sudo make install.
I reboot the BBB, and the GPIO is now pulled up.

Thanks Robert Nelson,
Niv

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to