graycatlabs / PyBBIO

A Python library for Arduino-style hardware IO support on the Beaglebone
https://github.com/graycatlabs/PyBBIO/wiki
MIT License
251 stars 87 forks source link

add_entry function using multiple text boxes #57

Open ibarshai opened 9 years ago

ibarshai commented 9 years ago

Thanks for getting this excellent library out there.

I'm currently using it to run a server to connect to a BBB, after which I'm interfacing with the IO using Adafruit's library. I'm pretty new at server client interaction and javascript, and I've been trying to accomplish the following:

  1. Create a form consisting of multiple text entry boxes, just as the ones used in the add_entry function.
  2. Click a submit button that takes the input from these multiple text boxes and allows me to pass them as an array into the function I'm specifying in my lambda expression.

I've been trying to tweak the library to accomplish this, but I don't think I can sift through all the interactions to get it fully working. Is this something that's supported or could be somewhat easily implemented using the pyBBIO framework? If so, any help would be much appreciated.

alexanderhiam commented 9 years ago

First of all, you're going to run into issues with device tree and pinmuxing if you try to use PyBBIO and Adafruit_BBIO in the same program. Is there something you need that PyBBIO doesn't have?

One thing you could do is use the add_html() method to add a custom HTML form with a submit button. It would require some additional code either in the Javascript or on the server side to handle the form submission.