Help with project to connect Arduino and web server

1

I'm trying to do a project where I want to move servomotors from a web and I can not do it. The server is a Raspberry Pi and I want to move the servomotors with some sliders. The thing is that for the servomotors to move I have this code on the Arduino:

/*
   MOVER DOS SERVOS CON ARDUINO
   Este codigo recibe numeros enteros por serial
   y mueve dos servos.

   Escrito por Nano en beneficio de los seres humanos <img draggable="false" class="emoji" alt="                    
asked by Orizzon 27.08.2017 в 23:32
source

2 answers

0

Chico, do not get involved, you can use in php to run the python, it's the fastest way and with less code here I leave you a example , however I see that the only 2 parameters that you want to pass are degrees and servo numbers. Also the form is wrong should be something <form method="post" action="" id="form1"> , since you must use a method, and an action (the page that redirects, in this case the same), then you can get these values with php and send them to the python code. Tell me how you are doing

    
answered by 29.08.2017 в 01:35
0

Instead of using Raspberry Pi you can use the module node mcu esp8266, I'm working with a project which is about domotica, I mounted a web server on it to be able to control servomotors, a relay and lights, all this by means of the Web navigator. One advantage is that you can directly program the module with the arduino ide, plus you will no longer use AT commands. Here you have a Example , I hope it helps, greetings.

    
answered by 11.10.2017 в 19:54