inexorabletash / jslogo

Logo in JavaScript
https://calormen.com/jslogo
Other
368 stars 146 forks source link

Add support for controlling a physical turtle #121

Open RoganDawes opened 4 years ago

RoganDawes commented 4 years ago

Hi,

I'm looking to build a simple 2 wheel robot, controlled by an ESP8266 WiFi microcontroller. My idea is to host jslogo on the ESP8266's webserver, and provide a websocket endpoint where the interpreted instructions can be sent for execution by the robot. The idea would then be that the user would see the turtle perform each step in their browser, followed by the robot performing it. Once the robot has finished the step, the browser would continue to the next step.

I'm not much of a JavaScript programmer, could anyone give me an idea of how easy or difficult it might be to extend this code to incorporate the above functionality? Would it require a complete rewrite to allow that sort of interaction with the server, or is it a relatively simple project?

inexorabletash commented 4 years ago

It's probably easiest to consider running Logo on the controlling page itself and the physical Turtle as just the turtle. It would hook into the appropriate commands issued to the canvas turtle implementation.

RoganDawes commented 4 years ago

Yeah, I was thinking of running the two turtles in parallel, perhaps with a “Test” button to run it only in the browser, and an “Execute” button to send it to the robot as well. I guess sending it to the robot INSTEAD of the canvas would work as well, on the Execute button.

Thanks for your response!

On Mon, 23 Dec 2019 at 21:04 Joshua Bell notifications@github.com wrote:

It's probably easiest to consider running Logo on the controlling page itself and the physical Turtle as just the turtle. It would hook into the appropriate commands issued to the canvas turtle implementation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/inexorabletash/jslogo/issues/121?email_source=notifications&email_token=AABHBC7625UYMYJ4PEF44Z3Q2EDSDA5CNFSM4J6SVARKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHRXMYQ#issuecomment-568555106, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABHBC5LE5KWUOITVU2JXULQ2EDSDANCNFSM4J6SVARA .