Results 1 to 2 of 2

Thread: Slider Pyqt for Servo Motors

  1. #1

    Default Slider Pyqt for Servo Motors

    Hi everyone,

    I want to do slider, but this slider include 0-180 degres angles and every one degres i receive this degre information and convert to ascii charackter. And then i send to my other program on stm32 (C++ side). How can i do this. I want to controll with 0-180 degres servos

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Slider Pyqt for Servo Motors

    Use QSlider, set the range to be 0 - 180, set the singleStep property to 1, and connect a slot to the QSlider::valueChanged(). In your slot, convert the integer value to ASCII and send it to your servo controller.

    If you don't understand what this means, then I suggest you look at the Qt documentation and the many, many Qt examples and tutorials that came with your Qt distribution and teach yourself the fundamentals of Qt GUI programming.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 1
    Last Post: 17th June 2017, 23:59
  2. Replies: 0
    Last Post: 29th January 2015, 11:55
  3. Dynamic label to right of slider resizes slider
    By zenzero-2001 in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2013, 11:11
  4. Qt servo
    By caodungviet in forum Qt Programming
    Replies: 1
    Last Post: 6th May 2011, 06:27
  5. Replies: 2
    Last Post: 21st March 2010, 10:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.