-
I have a simple requirement to output a pulse for every 1 m travelled on my RPi 4 Openplotter v3. I started with a simple js code but got stuck on the above error. There seems to be a version problem between Openplotter SignalK and the @signalk/client. plugin.id = 'signalk-speed-to-pulse'; plugin.start = async function (options) {
}; Here is my SpeedToPulse program: class SpeedToPulse extends EventEmitter {
} initGPIO() { async setupSignalKClient() {
} async loadSignalKClient() { handleSpeedUpdate(delta) {
} calculateDistance(speed, deltaTime) { generatePulse() { cleanup() { export default SpeedToPulse; Any help would be greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Plugins can access Signal K data directly via server’s plugin apis, no need for the client. You would be better off starting from a blank plugin, then add data access and finally gpio. https://demo.signalk.org/documentation/develop/plugins/server_plugin.html …but if I were you I would probably use Node-RED plugin, as it is pretty well suited for this kind of task. |
Beta Was this translation helpful? Give feedback.
-
Thanks Teppo,
I'll look into Node-Red.
Regards,
Paul
Paul Peterson
Principal Maintenance Engineer
Engineering & Technical Consultants
0427 072 373
…---- On Tue, 10 Sep 2024 16:49:34 +0800 Teppo Kurki ***@***.***> wrote ---
Plugins can access Signal K data directly via server’s plugin apis, no need for the client. You would be better off starting from a blank plugin, then add data access and finally gpio.
https://demo.signalk.org/documentation/develop/plugins/server_plugin.html
…but if I were you I would probably use Node-RED plugin, as it is pretty well suited for this kind of task.
—
Reply to this email directly, #132 (comment), or https://github.com/notifications/unsubscribe-auth/AMTEWH33VADI3MDM6WLDAETZV2XB5AVCNFSM6AAAAABN56T2AOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANJZHE4DSNA.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
Plugins can access Signal K data directly via server’s plugin apis, no need for the client. You would be better off starting from a blank plugin, then add data access and finally gpio.
https://demo.signalk.org/documentation/develop/plugins/server_plugin.html
…but if I were you I would probably use Node-RED plugin, as it is pretty well suited for this kind of task.