-
Notifications
You must be signed in to change notification settings - Fork 5
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
Overhaul API and update for Dart 3 #12
Comments
Really pleased to hear you're updating this package. Let me know if you would like some help - although I can't help out with the C code! |
Much appreciate the offer of help. |
I've been tracking this package for a while and always been keen to see if I can drive an LED matrix from Dart but not yet given it a go. This is a good excuse to try, so once you're ready for a tester give a few weeks and I'll get back to you! Did you push any of the new code yet? Let me know when it's in a position to test and I'll have a go with it! |
Just pushed 0.4.0-dev.1 with the new API.
Good progress, but I still have more work to do |
Just pushed 0.5.0 with new API. |
Great package! Thank you a lot. Is there any chance to see update with PWM support soon? I am testing this on Pi4b by the way. |
Glad it's useful to you! I am using this package in production but have never needed PWM and thus haven't gotten around to adding it. How do you envision using it? That will give me a better idea of what needs to be added. And thanks for letting me know that you are on the Pi 4... good to know it works there as well. |
Actually Dart is my first programming language and Flutter is the first SKD. My needs right now are more about hobby and learning something new and interesting, but not about production or any other serious project/mvp. I want to upgrade a child toy - racing track for two cars. Each car has 2 contacts at the bottom which get 5V and GND (I guess) from contacts on the track and you can control speed of a car with a trigger which is actually a manual resistor. I want to connect track directly to Pi and control the speed of each car with PWM (Angel sdk as API server). I tried to use Dart loops to somehow repeat the PWM process, but they are too slow. If you have any other idea how I can reach my goal please share, that would be great! |
I did some digging and from it appears that the 2 PWM pins on RPi 4B might not interfere with the audio jack (an issue on earlier Pi models). I don't know for sure and I don't know if you need the audio jack. I don't think you can drive/power the track directly from the RPi. You'd need some type of relay between the PWM output and the track. I think an optical relay based on the switching frequency needed. It's been quite a while since I played around in this area so consider this advice imperfect at best :-) It will take me a while but I can look into updating the code to drive LEDs with PWM, but it would be up to you to figure out the rest of the circuit from the PWM to powering the track. Let me know if you are up for that and I can start working towards PWM support in this library. |
Thank you very much! I already ordered this track and will get it by the end of the week. Will wait for any updates and can help with testing on PRI 4b. This could be the first Dart package that supports PWM 👍🥇🎉 |
Hi! Some updates from me:
Well, I think now It should be clear how I will use PWM (frying RPI, yeah! :) ). |
Ouch! Welcome to hardware 😄 . I've fried my share of chunks of hardware over the years. I'm opening a new issue focused on adding PWM support |
Reworked the code to support PWM in a separate isolate... and published 0.6.0 |
This package has been updated to use |
Just pushed version 0.9.1 with fixes for gpio inputs on RPi 4 |
Version 0.10 now relies on |
There's a lot of unused C code and unnecessary complexity that I aim to remove in the process of readying this package for Dart 2. The work-in-progress API that I'm working towards has a library of abstract classes ...
... along with a separate library containing a concrete
RpiGpio
implementation ofGpio
and associated native code to make it all happen.
Current status:
Dart 3.x Platforms:
Dart 2.x Platforms:
OS:
The text was updated successfully, but these errors were encountered: