Spent the afternoon working on a project I have been putting off for a while now. Right now the data displayed is pretty basic.
It’s a web page served from the BBB that uses node.js to check the BBB and display the current gpio data. The data being displayed is (from outside in), receiver state, resistor direction, pin mode, and pin number from the BBB. I’m also going to add the offset.
This should come in really handy when testing device tree overlays, and for checking that pins are set up properly for various projects.
The next step, after adding P8, is to integrate #bonescript and http://socket.io so that I can use the page to directly manipulate the pins, automatically generate device tree overlays, and see the available/in use status of various pins so that I can plan accordingly for projects.
Still a long way to go, but it’s a good learning experience.
Once it’s more complete I’ll post the code if anyone is interested.
Working on something very similar. Trying to wrap my head around some http://socket.io within node.js to make it all update the browser as the pins change.
@Anuj_Deshpande I’d like to get it a bit further along and a lot more presentable first, but I may just take you up on that offer for help.
@Steven_Critchfield I’ve been looking at the same thing. It’s a bit of a head scratcher. I think I may have a partial solution, but won’t know until I get to test it.
Can you share any details on your project? Maybe we could compare notes.
Well, the pins on my device are actually accessed through the i2c port and a MCP23017 chip. While the BBB looked promising with all those pins available, as I researched in, I didn’t like the devicetree and mode switching complexity. So I side stepped it.
I have written a library for the MCP230xx chips that can have a mix of 8 and 16 pins chips, and it will let you access them very similar to the wire library. You just register the chip with the number of pins, and what pin number to start at. Then just set direction and read/write to the pin number. I’m going to later add a way to read multiple pins at once to save time when you want to read any of a bank of pins.
With that library, I have even written a SPI library for speaking to the MAX31855 chip sitting off the pins of the MCP23017 chip on i2c.
All of this is the physical basis for a barbeque controller. Drop a themocouple into the cook chamber, set a fan on the firebox, and control fan via a mosfet.
I am right now struggling with the UI portion now. It is a bit more difficult than the arduino/bluetooth/android app I wrote previously. But I am expecting it to be less buggy.