Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » How to add wiringPi library to access the softPWM functions.
How to add wiringPi library to access the softPWM functions. [message #1740478] Sun, 14 August 2016 14:37 Go to next message
Santosh Kumar Panda is currently offline Santosh Kumar PandaFriend
Messages: 9
Registered: June 2016
Junior Member
Hi All,

I want to generate a software based PWM in Raspberry Pi. For this I have installed wiringPi library.

Now I want to add the wiringPi library to Forte while compiling it. How this can be done? Also do I need to compile the same in the local forte?

Thanks,
Santosh
Re: How to add wiringPi library to access the softPWM functions. [message #1740482 is a reply to message #1740478] Sun, 14 August 2016 18:20 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 523
Registered: January 2014
Senior Member
Hi,

you need to specify the library you want to add in the CMakeList.txt file with the forte_add_link_library command. You can have a look at the mqtt_paho module for examples on how you can do this.

No you don't need to add this to your local forte. You only need add the libraries for the specific platforms.

Alois
Re: How to add wiringPi library to access the softPWM functions. [message #1777912 is a reply to message #1740478] Wed, 06 December 2017 06:46 Go to previous messageGo to next message
Barry wan is currently offline Barry wanFriend
Messages: 32
Registered: July 2017
Member
hi,i also want to control a motor with pwm use 4diac on raspberry board,
have you finished it ?
Re: How to add wiringPi library to access the softPWM functions. [message #1778362 is a reply to message #1777912] Wed, 13 December 2017 13:15 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 76
Registered: February 2016
Member
I have created a PWM as a Servcie Function Block that only works on posix, so it would work for the rpi. It is a software PWM that turns on and off an output in its own thread. I could attach the .fbt, the .cpp and the .h file here, but I'm not sure if that's what you are looking for
Re: How to add wiringPi library to access the softPWM functions. [message #1778497 is a reply to message #1778362] Fri, 15 December 2017 01:44 Go to previous messageGo to next message
Barry wan is currently offline Barry wanFriend
Messages: 32
Registered: July 2017
Member
would you mind sharing it with me ? thank you
Re: How to add wiringPi library to access the softPWM functions. [message #1778578 is a reply to message #1778497] Mon, 18 December 2017 08:25 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 76
Registered: February 2016
Member
Hi, here are the FBT file to be used in 4DIAC and the cpp and h file to compile in forte. Follow https://www.eclipse.org/4diac/documentation/html/installation/install.html#ownFORTE to build forte with the new FB.
  • Attachment: PWM.fbt
    (Size: 5.47KB, Downloaded 46 times)
  • Attachment: PWM.h
    (Size: 3.32KB, Downloaded 28 times)
  • Attachment: PWM.cpp
    (Size: 5.78KB, Downloaded 19 times)
Re: How to add wiringPi library to access the softPWM functions. [message #1778630 is a reply to message #1778578] Tue, 19 December 2017 06:37 Go to previous message
Barry wan is currently offline Barry wanFriend
Messages: 32
Registered: July 2017
Member
Thank you very much for your sharing

[Updated on: Tue, 19 December 2017 06:55]

Report message to a moderator

Previous Topic:Raspberry Pi 2 B FlipFlop Tutorial
Next Topic:OPC UA : data change notification
Goto Forum:
  


Current Time: Mon May 21 11:06:39 GMT 2018

Powered by FUDForum. Page generated in 0.02307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top