0
How are certain devices like computers, modems, and microcontrollers connected in a way to where you can manipulate them with C+
I want to use my newly acquired C++ knowledge to make a chat client and to mess with Arduino, however, I don't know how these devices are connected to where some code can manipulate them or how you can inherit librarys into your programs to use certain functions and key words to do these things. PLEASE HELP!
5 ответов
+ 2
You can work here with many type of hardwares:
https://www.gnuradio.org
0
my question may seem confusing as I don't exactly know how to put it into a. concise question. But I'm curious first of all, how those devices are connected(what enables a computer to control an outside device like some other harware). And also how I can actually perform this and use certain libraries that will enable me to control the output through a program such as a chat application from one device to another.
0
there are many protocols that can be used for that.
a very high level approach could be mqtt.
It works like publish/subscribe
another approach is socket programming.
a program listens to a certain port. All languages should have a library for that.
W.O Internet you could try bluetooth, radio, p2p, serial.... but maximum 100 meters.
In RaspberryPi classes I use socket programming for minecraft. All students can send messages to one common world from different raspis.
0
Hi,
for c++ and microcontroller a would absolutely recommend mbed.
https://os.mbed.com/cookbook/Homepage
As a first microcontroller which is supported by mbed you I reommend BBC micro:bit, which ist cheap and has some sensors (accelerometer, gyroscope, light,...)
So reading some sensor data is not too complicated.
If you keep the controller connected to usb-port of any other computer, it ist possible to send data via seriell interface.
On windows for example putty can read the seriell interface (I remember on COM6).
Any other os might have its own app.
0
@emi cool stuff!