openroc / arduino-pwm-frequency-library Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/arduino-pwm-frequency-library
Automatically exported from code.google.com/p/arduino-pwm-frequency-library
I wanted to extend the library for ATMEGA32U4 and ATMEGA16U4 family : Leonardo
board.
I give you my results :
- a new PWM.h file
- a CTimerDefs.h file
- a CTimerDefs.cpp file
It seems to be good for my first tests.
But I am not be able to implement the Leonardo's specific 10-bit High Speed
Timer/Counter4.
Hope this will help somebody ...
Pierre
Original issue reported on code.google.com by [email protected]
on 23 Oct 2013 at 1:54
Attachments:
*: undefined reference to `InitTimersSafe()'
*: undefined reference to `SetPinFrequencySafe(signed char, unsigned long)'
collect2.exe: error: ld returned 1 exit status
Using library pwm at version 5.0 in folder: *\Documents\Arduino\libraries\pwm
This is the same on all SAMD boards.
Same sketch for AVR compiles without issues.
Trying to get all 6 pwm outputs on a UNO to run the same frequency.
my testing sketch
#include <PWM.h>
int32_t frequency = 3500;
void setup() {
InitTimers();
SetPinFrequency(3, frequency);
SetPinFrequency(5, frequency);
SetPinFrequency(6, frequency);
SetPinFrequency(9, frequency);
SetPinFrequency(10, frequency);
SetPinFrequency(11, frequency);
pwmWrite(3, 50);
pwmWrite(5, 50);
pwmWrite(6, 50);
pwmWrite(9, 50);
pwmWrite(10, 50);
pwmWrite(11, 50);
}
void loop() {
delay(100000);
}
This works and gives output on port 3,5,9,10 but not on 6 and 11
same result on an genuine UNO R3 and an UNO R1(clone/compatible)
using:
Arduino PWM Frequency Library v_05.zip
Arduino 1.0.3
Original issue reported on code.google.com by [email protected]
on 1 Apr 2013 at 1:31
PWM folder (contains)
keywords.txt
PWM.h
utility
PWM_lib_example(contains)
PWM_lib_example.ino
PWM_lib_resolution_example(contains)
PWM_lib_resolution_example.ino
Header in above sketch show #include <PWM.h> PWM is blue!!! No PWM.cpp Shown
Attempting to compile shows:
PWM_lib_resolution_example.ino: In function 'void setup()':
PWM_lib_resolution_example:39: error: 'InitTimersSafe' was not declared in this
scope
PWM_lib_resolution_example.ino: In function 'void
demonstrateFrequencysEffectOnResolution()':
PWM_lib_resolution_example:52: error: 'SetPinFrequency' was not declared in
this scope
PWM_lib_resolution_example:54: error: 'Timer1_GetFrequency' was not declared in
this scope
using V5 on a Mac OS Mavericks Arduino 1.0.5
I am a newbie, PWM shows in Contributed and when I click on it nothing happens,
I assume that the <PWM.h> should not be blue but browny/red as per normal.
IS this a missing CPP? I have tried V4 and just keep bashing my head, its
bleeding
Many thanks for your kind attention
I have even tried this on a Windows * machine, same issues
Original issue reported on code.google.com by [email protected]
on 27 Oct 2014 at 5:03
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.