No announcement yet.

Need help with PHPoC and Arduino "Please help"

  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help with PHPoC and Arduino "Please help"

    I need to create a box with a stepper motor. I must be able to control the motor both locally and from local intranet. I have found (Youtube and the Web) most of what I needed but I am unable to figure out how to combine them.

    I have an Easy-driver running my stepper motor. I have a Nokia LCD to display current position and values being entered. I also have a keypad to manually enter in values. At this point this works (although I would like to find a way to retain the current position during a power failure)

    With this I have a PHPoC shield to allow to connect via local network (i.e. phone). I found a sketch and PHP file that allows me to connect, see a identical picture of the keypad and enter in values that can be seen in the serial monitor.

    What I cant figure out is "how do I make the keys pressed remotely act the same as if they were being entered in locally on the keypad so the information can be passed to calculate the distance, move the motor to the calculated location and change it to the current position?"

    I have attached the 2 edited sketches I am using and the PHP file.
    Last edited by Brian Roberts; 06-26-2018, 12:25 AM. Reason: Resolved. Combined sketches and ran a second loop

  • #2
    I take a look and see that in Stepper Keypad you have loopkey() function to handle key press event. Seems like it is similar to loopweb() in your arduino_code.ino file, the function you use to handle remote key press.
    So I think you can modify loopweb() function and make it process similar to loopkey() in Stepper Keypad.
    Hope it helps