- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
I've used the Arduino Servo library,
https://www.arduino.cc/en/Reference/Servo Arduino - Servo
which has two attach() functions https://www.arduino.cc/en/Reference/ServoAttach Arduino - ServoAttach :
servo.attach(pin)
servo.attach(pin, min, max)
I see that Intel Galileo Servo has other two attach functions:
uint8_t attach(int16_t pin, bool force48hz = false); // attach the given pin to the next free channel, sets pinMode, returns channel number or 0 if failureuint8_t attach(int pin, int min, int max, bool force48hz = false); // as above but also sets min and max values for writes.
I assume (correct me if I'm worng) that the "force48hz" parameter would be for setting PWM period, but I would like to know why it is necessary in Galileo...
TIA,
Fernando.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Fernando,
If the force48hz argument is set to true, the initial frequency will be 48Hz; otherwise 188Hz is assumed. The other argument, called pin, only specifies the PWM pin to be used to emit the pulse signals to the servo.
-Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thank for replying, Sergio,
I would like to know why it is necessary in Galileo...
.. because it is not the way it's implemented and used in Arduino... why the change? Furthermore, is 188Hz the Arduino default?
Fernando.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Fernando,
Thank you for your patience. The libraries are expected to be different as the architecture of the boards is different. As for your question, the Arduino UNO has a frequency of approximately 490 Hz in most pins (3, 9, 10 and 11) and a frequency of approximately 980 Hz in pins 5 and 6, this information can be found here https://www.arduino.cc/en/Reference/AnalogWrite https://www.arduino.cc/en/Reference/AnalogWrite
-Sergio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page