Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0.0 #8

Merged
merged 51 commits into from
Jan 7, 2015
Merged

v2.0.0 #8

merged 51 commits into from
Jan 7, 2015

Conversation

nekuz0r
Copy link
Collaborator

@nekuz0r nekuz0r commented Jul 24, 2014

v2.0.0

  • Update: libWiringPi to custom v2.20 nekuz0r
  • Update: split source code (based on libWiringPi hierarchy) nekuz0r
  • Update: better types check nekuz0r
  • Update: better allowed values check nekuz0r
  • Update: better error messages nekuz0r
  • Update: documentation nekuz0r
  • Update: constants are exported from c++ (ReadOnly | DontDelete) nekuz0r
  • Update: setup() is exported from c++ nekuz0r
    • NOTE: it no longer accepts empty parameter 'mode' (breaks backward compatibility)
  • Update: wiringPiSPIDataRW now takes a buffer as second parameter (no third anymore) nekuz0r
  • Update: piBoardId nekuz0r
  • Remove: backward compatibility constants nekuz0r
  • Remove: export of piComputeModuleRevisionNames nekuz0r
  • Add: export of PI_MODEL_* constants nekuz0r
  • Add: export of PI_VERSION_* constants nekuz0r
  • Add: export of PI_MAKER_* constants nekuz0r
  • Add: export of piMakerNames string table nekuz0r
  • Add: wiringPiISR nekuz0r
  • Add: pwmToneWrite nekuz0r
  • Add: CHANGELOG.md nekuz0r
  • Add: wiringPiI2C support nekuz0r
  • Add: wiring-pi install gpio utilty (required for interrupts) nekuz0r
  • Add: ds1302 support nekuz0r
  • Add: gertboard support nekuz0r
  • Add: lcd support nekuz0r
  • Add: lcd128x64 support nekuz0r
  • Add: maxdetect support nekuz0r
  • Add: piFace support nekuz0r
  • Add: piGlow support nekuz0r
  • Add: piNes support nekuz0r
  • Add: tcs34725 support nekuz0r
  • Fictitious: this release eats Pi(e)s :)

nekuz0r and others added 30 commits July 4, 2014 15:45
Fix: missing constant in pinModeCheck
Fix: missing constant PI_MODEL_CM
Add: serialPrintf (alias to serialPuts)
- Split the source code (based on libWiringPi source code hierarchy)
- ADD: Implement I2C functions
- ADD: Aliasing serialPrintf to serialPuts
- FIX: missing constants in pinMode check
- ADD: missing constant PI_MODEL_COMPUTE
- ADD: wiringPiISR support (experimental)
- UPD: Exports constants from C++ (ReadOnly | DontDelete)
- UPD: Exports setup function from C++
- UPD: setup function no longer accepts calling without mode defined
(breaks backward compatibility)
- ADD: Better types and allowed values check
- ADD: Better error messages
- UPD: wiringPiSPIDataRW now takes two parameters, a node buffer as
second parameter (instead of a string as second and length as third)
- UPD: README.md (move documentation to DOCUMENTATION.md)
- UPD: Documentation
- UPD: Package.json version and contributors section
- ADD: version history file (CHANGELOG.md)
- DEL: Backward compatibility constants
- UPD: documentation
- UPD: install script (add gpio utility installation, make check, fix
update)
- ADD: drcSerial extension
- UPD: examples
Useless since callback is associated with interrupt on a given pin
ADD: pwmToneWrite
UPD: pi model constants
ADD: pi version constants
ADD: pi marker constants
ADD: export pi maker names string table
DEL: export pi compute revision names string table
@nekuz0r
Copy link
Collaborator Author

nekuz0r commented Jul 24, 2014

Hello,

DO NOT MERGE IT RIGHT NOW !

I created this pull request to get your opinion.
I still have some modifications to make.

Can you please review the code ? :)

@eugeneware
Copy link
Member

Wow! What a huge update! I've had a look through and it's looking pretty good to me. I'm actually on a business trip at the moment, so time is a bit of a premium. Happy for you once you've stabilised the bill to push it out and then to address any fixes as minor version fixes.

Well done, this is great work!

wiring is no longer linked as a git submodule, revert to cloning in
install script
ADD: dac7678 support
ADD: tcs34725 readHSV
@nekuz0r
Copy link
Collaborator Author

nekuz0r commented Dec 25, 2014

Merry christmas everyone,
I need some more time to check everything is ok with this version, it should be promoted to master in the next weeks.

@jdesboeufs
Copy link

Great!
I'm waiting for that!

@eugeneware
Copy link
Member

woo! can't wait!

@jdesboeufs
Copy link

NOTE: Each “cycle” of PWM output takes 10mS with the default range value of 100, so trying to change the PWM value more than 100 times a second will be futile.

So 100 Hz is the limit?
In this blog post wiringPi binding for Python is able to hit 20 kHz. Where is the gap?

@nekuz0r
Copy link
Collaborator Author

nekuz0r commented Dec 28, 2014

There are some limitations… To maintain a low CPU usage, the minimum pulse width is 100μS. That combined with the default suggested range of 100 gives a PWM frequency of 100Hz. You can lower the range to get a higher frequency, at the expense of resolution, or increase to get more resolution, but that will lower the frequency. If you change the pulse-width in the driver code, then be aware that at delays of less than 100μS wiringPi does it in a software loop, which means that CPU usage will rise dramatically, and controlling more than one pin will be almost impossible.

Source: http://wiringpi.com/reference/software-pwm-library/

The blog example you are referring to is using a soft loop to switch the pin state as fast as possible.

RPI has a hardware pwm on pin 1 (BMC_GPIO 18, Phys 12).
You can control it with the following functions :

  • pwmWrite
  • pwmSetMode
  • pwmSetRange
  • pwmSetClock

Generating a PWM signal on any other pin requires to do it in software, then you will use :

  • softPwmCreate
  • softPwmWrite
  • softPwmStop

softPwmCreate takes as third argument the range.

Hope this answers your question :)

@jdesboeufs
Copy link

Thanks for the explanation ;)

@nekuz0r nekuz0r merged commit cf0ecd2 into WiringPi:master Jan 7, 2015
nekuz0r added a commit that referenced this pull request Jan 7, 2015
@nekuz0r nekuz0r deleted the incoming-v2.x branch January 7, 2015 11:40
@eugeneware
Copy link
Member

Great job on landing this @nekuz0r ! Woo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants