Quick Update - Working on Pi Code Today!!

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
tvoverbeek
Posts: 5
Joined: Sun Feb 11, 2018 8:20 am

Re: Quick Update - Working on Pi Code Today!!

Postby tvoverbeek » Sun Feb 11, 2018 8:26 am

Regarding the TCP socket problems with the Pi code, see my comments on the latest Kickstarter update.
Cannot test it right now, since I am on travel and away from my Pi(s) and the still unassembled Spirit (pesky small screws).

gpvillamil
Posts: 75
Joined: Fri Jan 26, 2018 5:03 pm

Re: Quick Update - Working on Pi Code Today!!

Postby gpvillamil » Mon Feb 12, 2018 7:18 pm

If you don't mind, I'll copy your comment here so that we have all the technical discussion in one place.

tvoverbeek wrote:Regarding the TCP socket problems with the Pi code, see my comments on the latest Kickstarter update.
Cannot test it right now, since I am on travel and away from my Pi(s) and the still unassembled Spirit (pesky small screws).


Here's your comment:
Regarding your TCP sockets problem.
Here are a few remarka about the code:
In the server socket setup (lines 84-88 in PlumGeekPixelServer.py) you never set
the server socket to non-blocking.
Suggest to add 'server.setblocking(0)' after the 'server = socket.socket()' line.
You have to set the client socket to non-blocking only once.
Remove 's.setblocking(0)' (line 52) and add `client.setblocking(0)' after the accept statement (line 37, 'client, addr = server.accept()')
The largest problem I have is with line 57: 's.send(data)'
Why are you sending the received data back? There is no receiver on the other side.
This is probably the reason for the hangs.

marckarasek
Posts: 23
Joined: Sun Jan 14, 2018 1:59 pm

Re: Quick Update - Working on Pi Code Today!!

Postby marckarasek » Sat Feb 24, 2018 2:22 pm

I have a couple of github repos setup already for the PI code and Android App I am working on for controlling the Rover.

I will setup a new repo for all the python code. You can add code to it.. I will take what has been released so far. the pixel code, etc.. and use this as a base for the new repo.

Marc

marckarasek
Posts: 23
Joined: Sun Jan 14, 2018 1:59 pm

Re: Quick Update - Working on Pi Code Today!!

Postby marckarasek » Sat Feb 24, 2018 2:28 pm

Just created two new repos:

https://github.com/MarcKarasek/RoverArduinoCode

Baseline Sketches for Arduino is in the Arduino Repo
All three zip files are now in their own dir in this repo.

https://github.com/MarcKarasek/RoverPythonCode
Baseline Python code for PI is in the Python Repo

https://github.com/MarcKarasek/RoverCCode
I will add to this the Led code I am going to be putting together.

I am going to copy this post to a new thread so others can see it. I think it will get lost in the noise.

Marc

headamage
Posts: 29
Joined: Mon Dec 04, 2017 5:27 pm

Re: Quick Update - Working on Pi Code Today!!

Postby headamage » Sun Mar 11, 2018 11:58 am

does anyone know why it goes crazy every time i run one of the demo python scripts?
it returns the values but then it starts doing random actions like someone is holding an object close to the range finder in demo mode 1.
have i misconfigured something or is it supposed to do this?

also, when i flash it with the pi sketch and then i run the rangefinder.py, i get 0 returned.

so it looks like the rangefinder.py can grab data when the arduino has the demo sketch but then the arduino goes crazy or it returns 0 when i run the pi sketch. Is this normal?


Who is online

Users browsing this forum: No registered users and 1 guest