Skip to content

Arduino Issue #1

@rrankin8801

Description

@rrankin8801

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!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions