Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino Issue #1

Open
rrankin8801 opened this issue Jan 6, 2015 · 0 comments
Open

Arduino Issue #1

rrankin8801 opened this issue Jan 6, 2015 · 0 comments

Comments

@rrankin8801
Copy link

Hi Jan,

For some reason the commands that ArduinoPi sends out to the Arduino are not being executed by the arduino. If I try to turn digital pin 8 High the Arduino does nothing. I know the Arduino is reading the data because I get a successful POST error handle:

{"state":"success","result":null}

I modified the writedigital function in arduino_pi.class.php to troubleshoot the message that it sends to the arduino by var_dumping the $cmd being sent:

            $this->sendMessage($cmd, 0.2);
        echo '<pre>'; var_dump($cmd); echo '</pre>';  <------------I Inserted this
            $this->deviceClose();
            return true;

The var_dump shows that $cmd is equal to this:

string(7) "@8,255:"

This string seems correct to me, but the arduino is not reacting correctly to it. Also, when the arduino receives the command, I think it resets. Do you have any idea on why it would be doing this?

Thanks for posting this library! I believe it is going to be really helpful to my projects!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant