Pexeus / LTE-Car

42 stars 12 forks source link

data not writing to GPIO? #5

Closed pinige closed 10 months ago

pinige commented 1 year ago

Please can you point me in the right direction?

video streams ok.. PS4 controller sends data ok..

On the Raspberry Pi I receive data.. like this:

Streamer: [udplus]0030car-control|object{"axes":{"0":0.127,"1":1,"2":0,"3":0},"paddles":{"left":0,"right":0},"buttons": "L1":0,"R1":0,"square":0,"triangle":0}}

But nothing goes to the GPIO pins. Also, on the browser page nothing happens when I click on the "start" button - it always says "offline"

Please can you point me to where I need to look? Many thanks for all your help and patience. Nigel

kwawmannanjnr commented 1 year ago

lets collab!

Pexeus commented 1 year ago

Hello, the log indicates that you are getting the data from the webclient to the PI. So i suspect a hardware issue.

Also the connection issue could be network related, or a misconfiguration in the config file

pinige commented 1 year ago

Hi, The wiring is correct - I have tried the servo test in onboard\dev\servos.js and they work fine. The config.json file is as follows: "host":"192.168.1.87", (My PC's IP address) "port_http":"1300", "port_udp":"3000", And the video streams perfectly.

Is there something else I should be configuring ?

Does the console.log from the Pi look correct? This is the output on the onboard Pi:

Sending to: 192.168.1.87:3000

Sending to: 192.168.1.87:3000

Many thanks for your help Nigel

Pexeus commented 1 year ago

Its my fault. the client uses an in dev build of my UDPlus Library, but the server uses the current build from NPM. i suspect they are incompatible. im gonna try and look it up, but you can also try and implement it urself. thats the package: https://www.npmjs.com/package/udplus

pinige commented 1 year ago

I've tried again using the same package on the Pi (onboard) and the server (as you suggested) but it still does the same thing.

Does this output that appears on the onboard Pi look correct?

Sending to: 192.168.1.87:3000

I'm not sure where to look next?

kwawmannanjnr commented 1 year ago

i'm having issues as well! Maybe we can debug on Zoom or something

Pexeus commented 11 months ago

Just Pushed some changes, try it out now! If it still doesnt work, tell me

pinige commented 11 months ago

I have started with a fresh install - I now get error:

UDP Connection Ready: 192.168.1.81:3000 /home/pi/LTE-Car/onboard/index.js:13 stream.init(udpClient, config) ^

ReferenceError: udpClient is not defined at /home/pi/LTE-Car/onboard/index.js:13:21 at EventEmitter.events.connect (/home/pi/LTE-Car/onboard/node_modules/udplus/index.js:197:9) at init (/home/pi/LTE-Car/onboard/index.js:10:18) at Object. (/home/pi/LTE-Car/onboard/index.js:19:1) at Module._compile (internal/modules/cjs/loader.js:1114:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10) at Module.load (internal/modules/cjs/loader.js:979:32) at Function.Module._load (internal/modules/cjs/loader.js:819:12) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12) at internal/main/run_main_module.js:17:47

I then changed ....\onboard\index.js from stream.init(udpClient, config) control.init(udpClient, config) telemetry.init(udpClient, config) to stream.init(udplusClient, config) control.init(udplusClient, config) telemetry.init(udplusClient, config)

I now get:

UDP Connection Ready: 192.168.1.81:3000 Initiating stream Initiating controls Initiating telemetry

... but the video is not streaming :-(

Pexeus commented 11 months ago

Ok, ill debug this this weekend!

pinige commented 11 months ago

Many thanks – I appreciate your help – thank you 😊

pinige commented 11 months ago

I have just used the "old" server and the new "onboard". After changing index.js (onboard/index.js) from "udpClient" to "udplusClient" on lines 13,14 & 15 it seems to work !

Hope this helps.

Pexeus commented 11 months ago

Great! Can you make a pull request with those changes? I have a test setup ready myself now

pinige commented 11 months ago

I'm away for the rest of the week ... will be able to do it on the weekend.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Pexeus @.> Sent: Monday, October 16, 2023 11:55:10 AM To: Pexeus/LTE-Car @.> Cc: pinige @.>; Author @.> Subject: Re: [Pexeus/LTE-Car] data not writing to GPIO? (Issue #5)

Great! Can you make a pull request with those changes? I have a test setup ready myself now

— Reply to this email directly, view it on GitHubhttps://github.com/Pexeus/LTE-Car/issues/5#issuecomment-1764218091, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A5ALY2ESDUYUYQKDMOFXE2LX7UHA5AVCNFSM6AAAAAA3ULXR3WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRUGIYTQMBZGE. You are receiving this because you authored the thread.Message ID: @.***>

pinige commented 10 months ago

Hi Pexeus, Apologies for messing you around - I have started from scratch (again) and downloaded your current version and it now works. I can only assume that the error was on my setup. Thankyou once again for all your help and patience - This is an awesome project! Very best regards Nigel.