Comments (6)
Hello @Aidan275, as you already did some code on C for doing GPIO operation. Can you please share the code.
I have created just a base class for generating the JNI libraries for doing communication with native C on commit: d72c520.
from iot-engine.
Adding additional info:
BBBiO example: https://github.com/Aidan275/BBBiO
Parent ticket: https://github.com/NubeIO/NubeEdge28/issues/1
from iot-engine.
@Aidan275 I had forked your C++ code and did small changes https://github.com/RaiBnod/BBBiO for testing. And for Java JNI call, I had made a Java micro-service base 478e478, where we can generate native library. With the help of the native build library and that Java native functional interface we can able to communicate with C.
But currently, it only supports digital read/write operations. And still we following todo tasks to complete on C:
- setPinMode - Configures the mode of a pin
- analogWrite - Write a PWM signal to an analog output pin
- analogRead - Read the voltage at an analog input pin
- attachInterrupt - Attaches an interrupt handler to detect changes on a digital input pin
- detatchInterrupt - Remove an interrupt handler
Could you please help me on this.
from iot-engine.
Additional Information
Prepare C/C++ code (SPI/PWM/GPIO of BBB) with APIs which can be called from Java (http://jonisalonen.com/2012/calling-c-from-java-is-easy)
Main functions needed at the moment are:
- setPinMode - Configures the mode of a pin
- digitalWrite - Write a HIGH or LOW to a digital output pin
- digitalRead - Read the status of a digital input pin
- analogWrite - Write a PWM signal to an analog output pin
- analogRead - Read the voltage at an analog input pin
- attachInterrupt - Attaches an interrupt handler to detect changes on a digital input pin
- detatchInterrupt - Remove an interrupt handler
Resources:
from iot-engine.
Java need to provide interface
and build a header
file then C++ implementation should be in
https://github.com/NubeIO/BBBiO
from iot-engine.
from iot-engine.
Related Issues (20)
- Make default network is WIRE and explicit value in edge-database
- Re-assign referencing resource to another resource
- Add NGINX as Reverse proxy
- Read and write to multiple points HOT 2
- History updates HOT 1
- For beta test version 1 of bios
- Feature Request: History trigger on COV AND on Periodic
- SQL constraint and unique validator
- SQL:: Support Force Deletion Resource
- SQL:: Support transaction
- Add Installer backup API
- CREATE/PATCH Point without specified enum type value
- Deleted point cannot be recreated via API HOT 2
- No response for forced DELETE of point or device HOT 2
- ?_force ineffective for DELETE /network/<id> HOT 1
- Deleting device using ?_force=true causes database error HOT 1
- Deleting entries with _force=true sometimes causes database error HOT 2
- Deleting device/thing does not remove child points HOT 1
- Points are created despite failing validation HOT 1
- Keep BACnet cov watcher work after restart
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 iot-engine.