I am controlling WS2812 LEDs with Arduino nano using FastLED library. I want the LED patterns to change on receiving a command from another Arduino Nano over software serial, I don't have the option to use he hardware serial. I have read that in order to write.
My question is about trying to get some understanding of how I can 'debug' my project and follow along with the data outputs.etc.
I have set up my RPi:
* Installed Raspbian OS Stretch
* Installed Apache
* Installed PHP
* Installed MySQL
* Installed PhpMyAdmin
* Populated tables
* Coded my web page/app (including all queries and PDO connections to database.etc)
* Have it loading this default web page upon boot
* Have this page displayed fullscreen (Kiosk mode) upon boot.
I have also ran these commands to help ensure data is being sent properly and works with correct permissions:
So I can now successfully load my default page from the RPi directly (browser) or from another (PC) machine on the network by going to the RPi's IP address.
The webpage is designed that upon 'submit' ($_POST).. I grab some of the $_POST data. and send it out via SERIAL using PHP... Here is where I am at currently. But I am at a loss on how to debug things to find out what is hanging.etc..
I have my Arduidno UNO connected to the RPi via USB.. (So I can receive this serial data coming form the RPi/PHP..-but also- to be able to send some serial data/confirmations BACK to the RPi. so it can then update the date/display on the webpage (basically bring it back to the normal 'menu' state)..
1.) And here is where I am at currently.. but I am a bit lost on how I can go about debugging in this type of environment/setup... when I cant use the serial monitor to know what/when Arduino is outputting any serial data back to the PHP app?
2.) Also.. confused on this as well: Being that PHP is a server side language, I get how it works to SEND the serial date OUT to the connected Arduino... but I'm not grasping on HOW it can 'receive' any response data? (especially after the page is 'parsed' [so to speak]). after the page has been parsed/loaded?
I'm assuming (possibly) some sort of AJAX call to an external .php script? However I have never seen an example of one doing it this way?
I mean page posts.
serial data gets sent to the Arduino (at I believe so...as I see the RX/TX lights on the Arduino blinking..(getting something))
but when the page posts. I want the page to display something like 'please wait'.. and when I get a response from the Arduino/Serial data.. then re-load the page back to the 'menu' (initial start page)..
I'd like some suggestions on how I can debug/follow what is going on with the Arduino (even though its connected via USB to the RPi)..
Here is how I am opening up the com port in my php script:
Code: Select all Ivation 18 bottle wine cooler manual.
Down to the bone future boogie rarest. Find album reviews, stream songs, credits and award information for Future Boogie - Down to the Bone on AllMusic - 2009 - Down to the Bone have been, since the late '90s, Find album reviews, stream songs, credits and award information for Future Boogie - Down to the Bone on AllMusic - 2009 - Down to the Bone have been, since the late '90s. British Jazz/ Funk supergroup Down the the Bone landed on our shores 11 years ago and changed the face of contemporary Jazz. 500,000 units and 5 #1 radio singles later, they are still tearing it up with their new release, FUTURE BOOGIE. Down To The Bone’s founder-leader Stuart Wade will be undertaking press and radio promotion for the new package, which has a playing time of more than 3 hours. Radio advertising on Jazz FM, Solar Radio, Delite Radio. Press advertising in Echoes magazine and Jazzwise. Live UK live dates for 2019 are currently being finalised.
Then after submission:
So to re-cap:
* Arduino connected via USB to RPi
* RPi hosted webpage loads/works correctly.
* Correct data is supplied after form $_POST (echo out the data) (when tested on a WAMP install before moving to RPi. webpage worked fine..and Arduino got correct serial data and parsed it correctly. (moving steppers and servos as expected)
* I 'believe' data is correctly being sent via PHP form the RPi to the Arduino. as I see the RX/TX lights blink..
But I see some odd behavior when trying to send another 'command'.. (hanging after page submission.etc)
All suggestions and feedback to help get me past tihs current hurdle is appreciated.
Thanks!