Hi,
I’m very new to CS. I just downloaded it and built a very simple dog-bot that acts like a talking dog. I’m impressed that I can do that just hours after downloading.
I have a large project in mind but first I want to do a simple “Hello World” example as follows: User types “turn on the LED” and the LED goes on. Assume I have a function in C called “turnOnLED()”
What is the best way to connect CS to this C function?
Reading the documentation it seems that I call tcpopen() with a parameters like “post, http::localhost/LED?state=1” Then I write a server process that waits for POSTs and acts on them.
I think I might get the above to work but there is a LOT of wasted CPU cycles. Is tcpopen the most efficient method? I’ve only been reading for a couple hours so there is likely a lot I don’t know yet.
Thanks.