Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop()
- {
- while (!Serial.available())
- ;
- auto message = Serial.readStringUntil('#');
- String parsed[3];
- auto count = split(message, parsed);
- Log.notice("comms : %s %d" CR, message.c_str(), count);
- if (count == 3)
- {
- if (parsed[0] == "pan")
- {
- pnts[parsed[1].toInt()].pan(parsed[2].toInt());
- }
- if (parsed[0] == "tilt")
- {
- pnts[parsed[1].toInt()].tilt(parsed[2].toInt());
- }
- } else if (count == 2)
- {
- if (parsed[0] == "led") {
- kakashi::led::displayImage(kakashi::led::SHARINGAN[parsed[1].toInt()]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement