luigif/hcsr04

It's working, but I have questions....

Closed this issue · 2 comments

thanks for writing this - at least I know that the HCSR04 will work with my BBB -
but I have a question.

Is it normal that I have to execute a "make install" each time I boot up the BBB?
and is there away to prevent doing this if it's not normal?

This works and seems to work fine (distances are very consentant) - what I really need or want is a python library for the HCSR04 do you know of any?

Thanks again.

A "make install" will compile everything and load the hcsr04 driver. If you have already done this, you can load the driver with the install-driver.sh script.
If you are familiar with the operating system that you run on the BBB (i.e. probably debian), you might also make it automatically run at boot.

This code consists of a device driver, PRU assembler code and a master C program that interacts with the assembler code via interrupts.
In principle it should not be very difficult to replace the master C program with some python code that directly interacts with the PRU using something like:

http://wiki.thing-printer.com/index.php?title=PyPRUSS_on_BeagleBone

Ok, that make a lot more since - because that is what I thought "make" did was to compile everything. I'll set the shell script (install-driver.sh) to start at startup, I think this program will work for what I am doing, I've looked at the hcsr04.c file, and modified it for my use where it just sends back a number, I think I can use my python script to execute "hcsr04" and get the number it needs. :-) Thanks again for the help, I'm going to look over the PyPRUSS on BeagleBone link as well.