Comments (12)
Test environment
- OS: Linux kernel 5.4, ubuntu 20.04 minimal
- HW: s905x3 board
Thank you :)
flutter_gpiod works well.
from flutter-pi.
GPIO (more precisely, libgpiod
) support is now integrated into flutter-pi
.
The dart interface still needs some work. Once it's done, I'll publish it on pub.dev.
from flutter-pi.
Yeah, that's a good idea.
from flutter-pi.
Alternatively you can create a backend with flask or django and call with dio in flutter to execute gpio commands using python.
Is tested and working
from flutter-pi.
Alternatively you can create a backend with flask or django and call with dio in flutter to execute gpio commands using python.
Is tested and working
That's kinda overkill but yeah, sounds like that should be working.
I found a package that does exactly what you want: https://pub.dev/packages/rpi_gpio
Only works for Raspberry Pi though, while flutter-pi (despite its name) works on much more embedded devices.
EDIT: Seems like it's also not that easy to use, since it requires you to compile a shared library on the Pi.
from flutter-pi.
Here’s another vote for GPIO access (unless dart:ffi gets working soon)
from flutter-pi.
Here’s another vote for GPIO access (unless dart:ffi gets working soon)
Yeah actually I started work on GPIO access using dart:ffi
and libgpiod
a while ago, because it's probably faster than platform channels. Had basic functionality going & was ready to test, then I found out dart:ffi
isn't yet supported on ARM hardfp platforms.
from flutter-pi.
Here’s another vote for GPIO access (unless dart:ffi gets working soon)
Yeah actually I started work on GPIO access using
dart:ffi
andlibgpiod
a while ago, because it's probably faster than platform channels. Had basic functionality going & was ready to test, then I found outdart:ffi
isn't yet supported on ARM hardfp platforms.
So, how did you solve this challenge? Write a flutter plugin for GPIO?
from flutter-pi.
So, how did you solve this challenge? Write a flutter plugin for GPIO?
I didn't (yet).
from flutter-pi.
Just published it.
from flutter-pi.
dart:ffi seems to be working with hardfp by now, according to dart-lang/sdk@a71d60c
@ardera Any chance you could share your FFI based plugin for reference?
from flutter-pi.
dart:ffi seems to be working with hardfp by now, according to dart-lang/sdk@a71d60c
Nice! Keep in mind though that this feature is only available to flutter once the next stable version of the dart SDK (2.8) is released. I'll consider migrating the flutter_gpiod
package to dart:ffi
once that happens. That would mean a lot of the ugly async stuff, mutexes, etc in flutter_gpiod
can go away.
@ardera Any chance you could share your FFI based plugin for reference?
Sure. The code is reaally ugly, very far from finished and doesn't look like the code of the flutter_gpiod
package at all, though. I was just kinda experimenting.
from flutter-pi.
Related Issues (20)
- Missing Depens in Readme ? HOT 2
- Different resolution in flutter-pi than that of the OS (DSI panel) HOT 4
- Installing on iMX6ULL HOT 6
- Audioplayers MissingPluginException HOT 1
- Orange Pi Zero 3 configuration HOT 3
- Does flutter-pi work on Orange Pi 3 LTS? HOT 1
- Error installing flutterpi_tool HOT 1
- Member not found: 'windows_arm64' HOT 1
- MissingPluginException No implementation found for method openFile HOT 1
- Mouse Only Moves on Half the Screen with flutter-pi Rotated 90 Degrees
- RK3566 board get black screen with a cursor
- New Snapp CLI Update: Easy Raspberry Pi Setup from scratch, and Custom Device Integration HOT 2
- Flutter-pi and nanodlp image display conflict problem. HOT 1
- How can I install the precompile flutter-pi package on Raspberry Pi? HOT 1
- Memory leak on NXP IMX8x HOT 3
- Directory Structure after build HOT 2
- Flutter-pi compiled app on CoreMP183 errors HOT 1
- [Seeking for help] "io.flutter.rast" received signal SIGSEGV, Segmentation fault on NXP IMX8 HOT 2
- Is it possible to replace `systemd` with `libuv` HOT 16
- How to rotate touch input by 180 degrees without rotating the displayed app? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-pi.