When will we have all the spec , docs and soft ??

The more technical aspects of Spirit, and carry-over discussion from Kickstarter updates.
User avatar
Astroghost
Posts: 9
Joined: Tue Oct 24, 2017 10:35 pm

When will we have all the spec , docs and soft ??

Postby Astroghost » Thu May 31, 2018 12:28 pm

Hi all ,

Kevin ,

after many month spirit rover is sleeping on a table.

When can we expect to received all we need to use this robot ?

- Xbee,blutooth,wifi communication
- remote controller command

After many month we are always waiting for , sorry but today we need to receive what we have paying for , and educationnal robot will all the information to use it ?

Regards
BERNIER François
FabLab Manager at L.A.B. Aix en Provence -FRANCE
http://astronomie-astrophotographie.fr

User avatar
Luunkaar
Posts: 2
Joined: Sun Apr 08, 2018 9:16 am

Re: When will we have all the spec , docs and soft ??

Postby Luunkaar » Sat Jun 02, 2018 9:17 am

That would be useful indeed, especially for the Pi - Arduino communication stuff, that I can't get to work properly. For now, I am rewriting the Arduino code to make it easier to code for the kids, but I'm having hard competition in the form of a Cozmo :D (kids ask me why Spirit don't talk.. :? )
I'll share stuff as I make progress.

I haven't really started on the Pi, I'm a noob when it comes to the bus, and any support will be useful.

Great fun, that Spirit is! Thanks !

Kevin
Posts: 181
Joined: Tue Jul 28, 2015 12:56 am

Re: When will we have all the spec , docs and soft ??

Postby Kevin » Mon Jun 04, 2018 4:16 pm

Hey guys. Sorry it's been slow.

I will make a real effort this week to at least have the instructions up to use XBee, Wifi, and BT on the main board. The main thing is understanding how the UART works as it is relayed through the PIC processor.

Luunkaar - can you give me a better idea of what problems you're having with the code? There was some problems early on due to the Raspberry Pi updating the hardware but we got that figured out. If you do make progress on this or get things running more smoothly please share.

-Kevin

User avatar
Astroghost
Posts: 9
Joined: Tue Oct 24, 2017 10:35 pm

Re: When will we have all the spec , docs and soft ??

Postby Astroghost » Tue Jun 05, 2018 7:27 am

Sorry Kevin but this is what you tell me by email in November and December 2017 and we are in June 2018 ;)
I have all you tell me to buy , Xbee-Wifi Ble module , sony remote controller but can't do anything with it :(
I have ordered this Robot for educational purpose for child but can(t do anything with it.

Next month there is in France the international Fab14 event and i hope to present your robot to public

I assume we need to configure the HC-06 module and then modify or add some line in the arduino sketch , but don't find howto

UART wrote:
/*************************************************************
* UART CONFIGURATION REGISTERS
*************************************************************/

void PIC_SetComUARTMode(unsigned char mode){ //TARGET REGISTER: 91 The PIC UART can be set to 1 of 4 possible communication paths.
// Use this function to set between them.
regTarget = 91; // Mode 0 = WiFi, Mode 1 = Bluetooth, Mode 2 = XBee, Mode 3 = Pi
I2CData[0] = mode; // Note: Pi must be powered up for Mode 3 to be set. PIC will ignore
I2CWrite(PIC_I2C_ADDRESS, regTarget, 1); // request to set Mode 3 if Pi is not powered up.
}

void PIC_UART_Baud(unsigned long baud){ //TARGET REGISTER: 92 Sets PIC UART pass through baud / serial speed
unsigned char baudMode = 0;
if (baud == 2400){baudMode=1;} // baudMode = 1 = 2400 baud
else if (baud == 9600){baudMode=2;} // baudMode = 2 = 9600 baud
else if (baud == 19200){baudMode=3;} // baudMode = 3 = 19200 baud
else if (baud == 57600){baudMode=4;} // baudMode = 4 = 57600 baud
else if (baud == 115200){baudMode=5;} // baudMode = 5 = 115200 baud
I2CData[0] = baudMode;
I2CWrite(PIC_I2C_ADDRESS, 92, 1);
}


void PIC_UART_IntRxCount(unsigned char byteCount){ //TARGET REGISTER: 93
I2CData[0] = byteCount; //
I2CWrite(PIC_I2C_ADDRESS, 93, 1);
}

void PIC_UART_IntRxChar(unsigned char nullCharacter){ //TARGET REGISTER: 94
I2CData[0] = nullCharacter; //
I2CWrite(PIC_I2C_ADDRESS, 94, 1);
}



François
BERNIER François
FabLab Manager at L.A.B. Aix en Provence -FRANCE
http://astronomie-astrophotographie.fr

Kevin
Posts: 181
Joined: Tue Jul 28, 2015 12:56 am

Re: When will we have all the spec , docs and soft ??

Postby Kevin » Tue Jun 05, 2018 4:02 pm

Okay I do understand your question.

I have attached a sketch to this message. It isn't pretty - very ugly code I used in testing the Bluetooth module a while back. Large parts are commented out from other tests. Ignore all the FastLED and SPI port stuff, but this should at least get you started. I still want to properly document the UART stuff in the manual.

The interesting parts to look at in setup() are:

PIC_SetComUARTMode(1); //set UART to Bluetooth mode
PIC_UART_Baud(9600); //default baud for HC-06 Bluetooth module

Then look at the non-commented out code in loop() to see how it actually works. This code should repeat the characters "56k" over bluetooth. I use an Android app called "Bluetooth Terminal HC-05" on a phone to talk to it, and you should see the characters showing up in the app once it's paired.

I'll try to dig into it more this afternoon. It would be really great to see people doing some things with the onboard communications.
Attachments
Rover_BaseSketch_Tst_PIC_UART_BTooth01.zip
(55.6 KiB) Downloaded 27 times

User avatar
Luunkaar
Posts: 2
Joined: Sun Apr 08, 2018 9:16 am

Re: When will we have all the spec , docs and soft ??

Postby Luunkaar » Tue Jun 05, 2018 9:18 pm

Hey Kevin

Thanks for the reply.
I'm making slow progress on the rewrite of the arduino (not because I'm slow, but because I don't put into it as much time as I'd like to), with basic functions like "rotate x degrees", "do a sad sound", "go to position x,y", etc... so a kid could code some motion into the device by stacking orders. My son loves when I tell him I've taught the device new moves, he's having fun, I'm having fun, which is what counts.

Running the Pi proves harder. I don't know the board very well, and I haven't spent a lot of time trying to learn about it either. Not yet at least. Might do that when I have some time on my hand. I can make the robot move, run the LEDs, pretty much reproducing what I can do with the arduino alone. But that's not why the Pi was added to the bot ! I want its brain to wake up, I want to be able to say, on a stormy night, "now rise, and walk !". ;)

Sample code works well, but as soon as I pretend to understand how the communication bus works, it just shames me to death by quasi systematically refusing to do what I thought I had asked it to do (often by doing nothing at all, actually). So a step by step tutorial on how that works would be a great booster, in my case.
Likewise, I've thought I could easily connect the Pi to my computer to be able to run it through WIFI with the keyboard and the video on screen, but that proved way above my level of understanding on how that works...
Okay, that's not may area of expertise, but that's just the point, I want to learn about it. Here again, having a tutorial that describes how to build a rock solid communication link between the Pi and a computer or an iPad, would be great help to me.

Maybe that's already available on the internet ? I don't know, haven't found one yet. Then again, I haven't commited a whole lot of time on that either, so don't worry too much about it.

Anyway, i'm still having a lot of fun with the arduino, but I'd really like to get to master the Pi as well. I read of people who've coded some image recognition features into their Pi, and that makes me think of a number of cool things to do with that much power on a robot like Spirit... including some that the Cozmo does right out of the box... (my son tells me that Cozmo says his name when it sees his face :roll: )

Cheers

User avatar
Astroghost
Posts: 9
Joined: Tue Oct 24, 2017 10:35 pm

Re: When will we have all the spec , docs and soft ??

Postby Astroghost » Thu Jun 07, 2018 3:44 pm

Great , thanks Kevin .

Ok i was able to control now the robot with BLE , for the moment about 10 commands.

Hurry to reveiced all the documentations we need , thanks
BERNIER François
FabLab Manager at L.A.B. Aix en Provence -FRANCE
http://astronomie-astrophotographie.fr

Kevin
Posts: 181
Joined: Tue Jul 28, 2015 12:56 am

Re: When will we have all the spec , docs and soft ??

Postby Kevin » Sun Jun 10, 2018 6:24 pm

I've started updating the Spirit Code Reference with the UART setup. I've got a bit in there now, and hopefully will be adding to it over the next couple days.

https://www.gitbook.com/book/plumgeek/s ... ce/details

There is a new entry in the Arduino Code section called "UART/Comms". Keep an eye on this section and I'll post updates here as we go along.

User avatar
Astroghost
Posts: 9
Joined: Tue Oct 24, 2017 10:35 pm

Re: When will we have all the spec , docs and soft ??

Postby Astroghost » Fri Jun 22, 2018 9:31 am

I Kevin ,

can you explain use how to control Spirit with the playstation controler ?
Do you have a ready to use arduino sketch ?

François
BERNIER François
FabLab Manager at L.A.B. Aix en Provence -FRANCE
http://astronomie-astrophotographie.fr

Kevin
Posts: 181
Joined: Tue Jul 28, 2015 12:56 am

Re: When will we have all the spec , docs and soft ??

Postby Kevin » Sat Jun 23, 2018 3:09 am

Hello Astroghost,

I got the code used for the playstation controller from a project called "Triangula". Here is the link:

https://pythonhosted.org/triangula/index.html

He was in process of updating the library and I was in a bit over my head when I was working on it. Basically it's a library to pair a PS3 controller to the Raspberry Pi via bluetooth. It then exposes some hooks I was able to use from Python to query what the buttons were doing. The example I did was pretty ugly and not very well organized - it's something I've always wanted to do a nice job of. I would certainly appreciate any help from the rest of you on that.

Also note there are other bits of code out there for sixaxis control and pairing. It may be worth looking for those (I didn't realize this until I was well into the first example). Try searching for things like "sixaxis raspberry pi".

The steps will involve pairing the controller with the Raspberry Pi, then getting his code running, then being able to get these values into your own python scripts. I suggest loading the Arduino sketch used for Pi control and just running the Arduino processor as a slave from the Raspberry Pi connected to the controller.

As it was last time I looked, you can query whether a button has been pressed, but (going from memory here) you can't tell when it gets released. You can re-query if I remember correctly. He was adding this ability at the time. You can however read the analog sticks real accurate.

I really am trying to get to doing this. Things have really changed here since we lost Juston last year. Getting the Kickstarter units out and doing all the production stuff I haven't been able to put enough time into marketing. Things have slowed down a bit and I've been doing some freelance projects to maintain things. I look forward to getting the Spirit docs to more of a finished condition.


Who is online

Users browsing this forum: No registered users and 1 guest