Controlling Sparki over bluetooth with C/C++

Hi. I need to create a C/C++ program that can send and receive information to Sparki over bluetooth. Handling the Sparki side of things looks pretty straightforward from the code examples. However, I’m unsure of a good place to start on the computer side of things. Basically, I just need to be able to send characters from the computer to Sparki wirelessly and vise-versa.

Will I need a special C/C++ library on the computer to handle the serial commands? Is there a recommendation for a simple, portable one? Any code examples would be extremely helpful if someone has already succeeded with this.

Some additional info that may be helpful:

  • I have some C++ programming experience, but none with serial communications specifically.
  • The main computer I need it to run on is Windows 10, though I would prefer a portable solution if practical.
  • CodeBlocks is my preferred IDE with minGW as my compiler.

Thanks for the help.

[quote=“Singularity”]Hi. I need to create a C/C++ program that can send and receive information to Sparki over bluetooth. Handling the Sparki side of things looks pretty straightforward from the code examples. However, I’m unsure of a good place to start on the computer side of things. Basically, I just need to be able to send characters from the computer to Sparki wirelessly and vise-versa.

Will I need a special C/C++ library on the computer to handle the serial commands? Is there a recommendation for a simple, portable one? Any code examples would be extremely helpful if someone has already succeeded with this.
[/quote]

You can use the library up at https://github.com/radarjd/sparki_learning for the Sparki side if you like. There’s another thread on the message board that explains how to send commands to it. I’ve got a python library to send from the computer (which is portable) if you can use python.

If you’re definitely using C/C++, I’m unaware of anything out there already written. Once you’ve got one put together, we’d love to see it!

Thanks for the tip. The Python code example may at least give me some ideas for how I can implement something similar in C++. I’ll be sure to share with the community if/when I figure things out. I have some lofty ambitions for Sparki, but its going to take a while for everything to come together.