Skip to main content
Michael Steve
Associate
February 21, 2018
Question

Controlling STM32 via PC

  • February 21, 2018
  • 2 replies
  • 903 views
Posted on February 21, 2018 at 17:36

Hey. I have program using graphical library SFML on my PC, which is suppose to send commands like 'turn on PWM on pin X', 'set pin X state high' etc to microcontroller. Until now, I was using Raspberry Pi 3 with pigpio library. I connected PC and Rpi via SSH and just send commands for Rpi terminal and pigpio library managed it. Is there a possiblity to achieve that with STM32 instead of Raspberry Pi? What should I learn to do that?

    This topic has been closed for replies.

    2 replies

    Andrew Neil
    Super User
    February 21, 2018
    Posted on February 21, 2018 at 19:09

    using graphical library SFML on my PC

    Never heard of it - how about providing a link?

    What should I learn to do that?

    You will have to learn the exact format of the 'commands' sent by SFML.

    Then you will have to learn to write code to receive & understand those commands.

    Then you will have to learn to write code to

     act upon the received commands.

    I was using Raspberry Pi 3 with pigpio library

    So you could start by studying that library - and any available documentation

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    Michael Steve
    Associate
    February 21, 2018
    Posted on February 21, 2018 at 22:03

    Oh, maybe I've express myself badly. The 'commands' are not from SFML (

    https://www.sfml-dev.org/

     link) - it's multimedia library, used for 'front-end' app on my Windows. Commands (caled 'pigs') were from pigpio (

    http://abyz.me.uk/rpi/pigpio/

     link) - but this library is made specially for Raspberry. With 'pigpiod' daemon (Raspian is Debian distribution for Raspberry) you can just type 'sudo pigs w 21 1' in Raspberry terminal for example, and it will write HIGH state on pin no. 21. That's the reason why I could connect via SSH and send this commands. But STM32 has no 'console/terminal' and no pigpio library