Shop OBEX P1 Docs P2 Docs Learn Events
RoboPi+Create - Page 2 — Parallax Forums

RoboPi+Create

2

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2014-06-16 18:53
    Hi Ray,

    Out of curiosity, what WiFi module uses /dev/ttyAMA0? I use USB WiFi sticks.

    FYI, you could just plug a PropPlug into a USB port, and plug it into a non-stacked RoboPi with the RoboPi's hcomm header installed. Then when initializing the RoboPi library, just pass the PropPlugs /dev/ name.
    Rsadeika wrote: »
    Now that I found out that the WiFi uses ttyAMA0, I am considering using the RoboPi as a stand-alone board that would control the Arlo chassis attached sensors. That way I could have a couple of pins for Rx/Tx and they could be connected to the RPi via ttyUSB0. For general information, for this project Spin is good, but C is better, and so all the Propeller related stuff will be in C, and at this point I am thinking that the RPi stuff will be in Python. But things do change, so...

    Ray
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-06-16 18:54
    Sounds like a great way of passing detected object info!
    ratronic wrote: »
    Thanks Bill.

    EDIT: The pictures I posted were using a Python program and opencv2. To get the opencv library for Python use I type sudo apt-get install libopencv-dev python-opencv .

    I had slightly noisy video when using the Raspberry Pi camera module but it takes very good still pictures. I am using a Logitech C270 web cam for the above. The serial output consists of a flag of !# and then a byte each showing the x

    and y coordinates of the detected object then transmits a word for z showing how large the object is. The video captured is resized to 190 by 140 for faster processing.
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-17 02:51
    LB-LINK WiFi module, which I purchased at Adafruit. In their write up, I get the impression that Adafruit provided the driver for the Raspian OS, so it is a plug and play device for RPi. I just noticed, on more frequent use of the WiFi setup, the WiFi acts a little flaky, meaning sometimes it finds a signal real fast, and sometimes, when the configuration has not been moved, it has a hard time finding a signal. I did try the WiFi module on my Windows 7 box, and it worked as advertised, with no problem determining a signal. So, it still might be a power problem on the RPi setup, which at this point I do not know how to solve.

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-17 05:33
    Robots and their pets. I was testing out the RPi vision system, and I guess the vision system started to spy on something and the cat noticed that it was being recorded. I have my picamera set to take a shot, wait five seconds, and take another shot. I guess on the first shot the cat was curious what the red LED on the camera was, so it came down to investigate. Hmm, lets see, some kind of cat sensors on the robot? Then what's next, claw protection for the robot? Need some levity, this getting to be way too serious of a project.

    Ray
    720 x 480 - 185K
    720 x 480 - 176K
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-18 09:24
    I did some more testing of my RPi WiFi configuration, and seems to be working as expected, the WiFi antenna is a positive add to the system. I also added a USB-TTL cable, and now seems to be appearing as ttyUSB0, which is good. So now I will try to test the whole system on the Create, and if that works then I know I will able too transfer the tech to another robot with a similar setup.

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-23 03:48
    So I was doing some more piddling around with this, and yesterday I added SimpleIDE to my RPi mobile unit. The preliminary tests, it is working better than expected. Now what I am thinking is that I will probably re-apply the Activity Board strategy, to control the Create, and the Activity Baord(Create) can have access to the RPi mobile unit. Once I figure out how I can jam the RPi mobile unit into the Create, hook it up to the Activity Board, and proceed to program it from my work station, then I can proceed with the project tests. I figure the Create can now be located anywhere, away from my work station, on the floor or ground, and I will be able to access it.

    The only concerns that I have at the moment are, how do I keep track of the battery voltage levels. There are two batteries, one that the Create has, and the power bank that is powering the RPi mobile unit and now the Activity Board. The Creates' battery, there are built in commands for that info, but the power bank is a different story. You would think that I am preparing to launch a rocket ship, exciting isn't it?

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-24 05:07
    I decided to add a couple of pics to show what the project looks like. I decided that, for the time being, I will be using the Activity Board for the actual control of the robot. As you can see I am definitely having a problem with the wires(cables), not sure how that will be resolved though. I guess with a bigger robot chassis, there could be more room to deal with the wires(cables), a better place to hide them.

    I still have to verify, for certain, that the WiFi module does use the ttyAMA0 port, when I think about it, does that make any real sense? But I have not noticed any other tty* ports being used, maybe I do not know what I am looking for? The use of the RoboPi system could reduce the amount of board space being used?

    Next I will try to remotely program the Activity Board to activate the robot for doing something, hopefully when the robot starts moving I do not have all the stuff in the cargo bay spilling out, what a mess that would be. Maybe I need an arm too pick all of the stuff up and...

    Ray
    1024 x 685 - 85K
    1024 x 685 - 83K
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-24 13:12
    Today I am having big problems with RPi WiFi, some days it works flawlessly, and other days, like today, it does not want to work as expected. Today I was trying to verify if the WiFi module was being assigned to ttyAMA0. No luck so far, I can only verify that if I have a USB-TTL cable hooked to GPIO uart(ttyAMA0), and the WiFi module plugged into the USB, I can get to the internet. So, that means when you are logged into the RPi via serial, you can get to use the WiFi. I still cannot figure out what port the WiFi is using. But under this condition, when I try to access the RPi via WiFi, it will not connect, it could mean that wlan0 is not able to find a signal, but who knows. More testing.

    The other thing that I noticed, when I had the RPi hooked up on LAN, and ran SimpleIDE with a QS board attached, after doing a some RUNs of a simple program, it started to loose the ttyUSB0 port(can't find a Propeller chip). I guess that is another situation that has be verified.

    Ray
  • ratronicratronic Posts: 1,451
    edited 2014-06-24 14:14
    Ray I have only just started with the Pi but from what I can tell from the last picture you posted there is nothing connected to Pi's P1 connector which is where the device /dev/ttyAMA0 is supposed to be connected.

    From what I understand you are using a USB/Serial device to connect to your WiFi device?
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-24 14:49
    In the cargo bay on the left side there is the power bank and on top of it sits a USB hub. From the USB hub you can see the WiFi antenna sticking out, in the next port I have the USB cable that is connected to the Activity Board, it is assigned the ttyUSB0 port. The reason I showed the pics is to demonstrate what a mess it is with all the USB wires. In fact today I had to pull all the cables out and trace them, too make sure that everything was connected to its proper location.

    I have somewhat narrowed the WiFi problem down to wlan0, the program does not always seek out the strongest signal, so if I moved the location of the robot, it has locked in a signal that is no longer available, and it does not do a scan(signal search). This could be a very big problem for a mobile robot.

    Ray
  • ratronicratronic Posts: 1,451
    edited 2014-06-24 15:22
    I just had a quick peak at the RoboPi's user manuel and it uses ttyAMA0 when plugged into Raspberry Pi to communicate with the Propeller, you have so much going on there I probably won't be much help since I am using Spin and Python.

    But it is interesting seeing you getting it all sorted out. I would like to see your C code when you get near the end. Good luck with all this and happy wiring Ray!
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-06-24 18:16
    Which Wi-Fi device are you using on the RPi?
  • ratronicratronic Posts: 1,451
    edited 2014-06-24 19:07
    Andy if you were asking me I don't use a WiFi device. I can plug in a ethernet cable from my router and ssh login via putty on Windows. If I were to use a WiFi device for the Pi it would be a USB WiFi device.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-06-24 22:56
    Sorry, I should have specified, I was asking Ray since he stated he was having intermittent connection issues.
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-25 05:50
    The USB WiFi module that I am using is an LB-LINK which is sold by Adafruit. It is basically a plug and play for the RPi, meaning the drivers are on the RPi already. In the pictures below I tried to layout all the USB cables so you can more or less follow them. Today, in this particular layout, the RPi is not able to find and lock onto a signal, that is strange because a couple of days ago it worked fine. In the upper right hand the blue USB-TTL cable is what I have plugged into the GPIO UART, which includes a ground wire. if that is not visible. And of course for this layout I have a QS board attached, normally it would be attached to the Activity Board on the robot.

    If the RPi does not sort out the functionality of the wlan0 connection, it may not be advisable to pursue this any further, because a mobile robot has to have a non interruptible WiFi connection. What I will probably do next is a brand new OS system install and start from scratch, which is so 90s. Also, if that resolves the problem than I will not be able to trust the OS, meaning it gets corrupted to quickly and you have to start from scratch.

    Ray
    1024 x 685 - 82K
    1024 x 685 - 85K
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-06-25 08:58
    Have you tried plugging the Wi-Fi adapter direct to the RPi? That is how I have mine and have not had any connection issues at all for the past couple of months that it has been connected no matter where in the house I have located the RPi. I have seen Issues when I had a USB hub connected with my keyboard and mouse losing connection to the Pi and It seemed to take a moment or two to "catch up".
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-25 09:30
    @Andy, is your adapter the antenna type? It has been recommended that you should run the antenna type adapters from an externally powered hub, they seem to draw a lot more power than the shorty's(antenna less).

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-26 04:00
    Since I am getting inconsistent results from the current setup, I think I will have to abandon that, and go with the Activity Board with an XBee as the main controller. This will be some what backwards, the RPi being in the support role; its like the hammer is going to be used as a screwdriver and the screwdriver is going to used as a hammer. Not sure what else can be done to get the consistent performance that I am looking for? Or I guess I could wait for the new Propeller chip, another 12 months or so, and work out a suitable combination out of that.

    Ray
  • NWCCTVNWCCTV Posts: 3,629
    edited 2014-06-26 14:29
    @Andy, is your adapter the antenna type?
    Well, I guess you got me there. I have just a standard one. Have you tried a standard unit? Might resolve that issue.
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-27 04:34
    Since this thread is really about the RoboPi, at this point, for my project, if the board had an XBee socket, I would be more inclined to go that route. Since I want to have the robot be mobile, and the WiFi part is not working out, the next option is the XBee. I know that I could do the breadboard thing and have the RoboPi get access that way, but that is going to make it more a cluttered mess than I already have to deal with.

    So, what I will probably do is have the Activity Board as the test board and see how many problems I run into that way, maybe in the long run, the RoboPi board just might be the right board to use. I still might try having the XBee connected to the RPi board, via ttyUSB0, and have a python program deal with that, not sure yet how I will test that aspect. Back to out lining my next test idea.

    Ray
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-06-28 12:58
    Ray,

    I'd just go with a supported USB WiFi stick for the Pi, and mount a RoboPi on the Raspberry Pi. I am doing that on 3 bots right now, more to follow :)

    This avoids /dev/ttyAMA0 conflict with your Adafruit serial WiFi module, and may be easier to program on the Pi as a normal WiFi USB stick just works with standard Linux networking (assuming a supported adapter).

    If you want to use that serial serial WiFi module, don't mount the RoboPi on the Raspberry Pi, and use a PropPlug to control RoboPi from the Raspberry Pi.

    Sorry I could not help earlier, I was on a cruise without internet.
    Rsadeika wrote: »
    Since this thread is really about the RoboPi, at this point, for my project, if the board had an XBee socket, I would be more inclined to go that route. Since I want to have the robot be mobile, and the WiFi part is not working out, the next option is the XBee. I know that I could do the breadboard thing and have the RoboPi get access that way, but that is going to make it more a cluttered mess than I already have to deal with.

    So, what I will probably do is have the Activity Board as the test board and see how many problems I run into that way, maybe in the long run, the RoboPi board just might be the right board to use. I still might try having the XBee connected to the RPi board, via ttyUSB0, and have a python program deal with that, not sure yet how I will test that aspect. Back to out lining my next test idea.

    Ray
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-06-28 13:03
    RoboPi can be mounted near a Raspberry Pi, in which case you can use a PropPlug to communicate with (and program) RoboPi from the Pi...
    void RoboPiInit(char *device, int bps) // use RoboPiInit(“/dev/ttyAMA0”,115200) - while baud rate is ignored for now, the device name is respected
    

    So if you are using a PropPlug, which shows up as say /dev/ttyUSB0, just specify "/dev/ttyUSB0" in the RoboPiInit call.

    I'll add support for changing the baud rate once I add a "change baud rate" command to the protocol.
    ratronic wrote: »
    I just had a quick peak at the RoboPi's user manuel and it uses ttyAMA0 when plugged into Raspberry Pi to communicate with the Propeller, you have so much going on there I probably won't be much help since I am using Spin and Python.

    Hope this helps!

    Bill
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-06-29 05:05
    Thanks for all the ideas and help with this project, I am heading in a new direction.

    Ray
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-06-29 07:19
    You are welcome!

    I will keep an eye on the new direction :)
    Rsadeika wrote: »
    Thanks for all the ideas and help with this project, I am heading in a new direction.

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-07-19 05:37
    This project just might be on track again. After buying and testing the new RPi B+, the problems that I was having seemed to been taken care of with the update of the power regulator on the B+. Bcause of the new power regulator I can now plug in the WiFi w/antenna module, the cable from the Activity Board, and have the camera module on line without having any problems. The one thing I did find out this morning is that the more things you have plugged into the USB sockets, at some point the battery pack will have to supply more than 1 Amp of power. On my battery pack I can have either 1 Amp or 2 Amp selection, so far evrything is working as expected. In fact the SimpleIDE package installed without any problems, before I hade to try it a couple of times before I got a good install.

    The next step is to get a class-10 uSD card, and reinstall the system, in fact I think I have a 16GB class-10 uSD card laying around somewhere. With that I probably will not need a USB flash drive for more work space. After I get all this tested then we will see if the project is really back on track.

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-07-19 08:38
    I found a 16GB class-10 uSD card, installed the OS, expanded the file system, installed SimpleIDE, placed the battery pack and the Rpi in the Create, and ran a test program to flash P26 and P27 LED on the Activity Board, all while being logged in via the WiFi. So, it seems like everything is working as expected. I am sure glad the WiFi is not crapping out on me, for the time being.

    Now I guess the next step is to write the program to control the Create via the Activity board, C language of course, and a Python program that talks to the Activity board. For now the Python program will be command line, latter I will have to come with a GUI program using wxPython, I hope the RPi has such a thing. And if all this works out, then I will start thinking about how to implement the RPi camera, in a streaming video form so it could be used to steer the the robot in a remote position.

    At this point I am not sure as to what Bill will be doing with a B+ model, in terms of a RoboPi board, but it looks like I have to have a B+ as a minimum configuration for my project.

    Ray
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-07-19 09:23
    Glad to see you are having better luck!

    I have learned not to talk about un-announced products :):):)

    For some unknown reason, my desk has several Raspberry Pi Model B+'s, all the printouts from the Pi Foundation on it, as well as calipers and rulers too.

    Eagle seems to be open on my desktop ... I wonder why?

    FYI, the current RoboPi would work fine on a B+, it would just be offset about 9mm from the front of the PCB, overhanging the back. I'll take some photos and post this weekend, but if you look on the EZasPi photos on a B+ on my site you will see the amount of overhang. Or it can be mounted beside the Pi.

    I love the four USB's, better power supply and mounting holes on the B+ !!!

    http://www.mikronauts.com/2014/07/17/raspberry-pi-b-with-rev-2-proto-board/
    Rsadeika wrote: »
    I found a 16GB class-10 uSD card, installed the OS, expanded the file system, installed SimpleIDE, placed the battery pack and the Rpi in the Create, and ran a test program to flash P26 and P27 LED on the Activity Board, all while being logged in via the WiFi. So, it seems like everything is working as expected. I am sure glad the WiFi is not crapping out on me, for the time being.

    Now I guess the next step is to write the program to control the Create via the Activity board, C language of course, and a Python program that talks to the Activity board. For now the Python program will be command line, latter I will have to come with a GUI program using wxPython, I hope the RPi has such a thing. And if all this works out, then I will start thinking about how to implement the RPi camera, in a streaming video form so it could be used to steer the the robot in a remote position.

    At this point I am not sure as to what Bill will be doing with a B+ model, in terms of a RoboPi board, but it looks like I have to have a B+ as a minimum configuration for my project.

    Ray
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-07-19 09:58
    I just looked at the RoboPi and B+, the overhang does not look that bad, but nothing ever looks bad in photos.LOL One concern that I can see, for my project is, is there enough clearence for the camera module ribbon cable, since that would be an essential part.

    Since I am using the Activity Board at the moment, hopefully I can determine what would be the minimum capability of a Robot Control System should be. The ADC would be necessary, be able to check the battery voltage status. I am leaning towards being able to use the built in XBee. I think the RPi has a speaker capability, so no need for that on the Propeller board. Not sure about having another SD socket, but a few more colored LEDs for testing and robot status would be nice. In fact maybe a green, yellow, and red LED for showing a visual status of the battery states. These are just a few things that I am thinking about.

    Ray
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-07-19 16:24
    Sounds like you have a roadmap!

    I should be posting some shots of RoboPi on a B+ based bot early next week - or at least that's the plan.

    Right now, I am working on PiBoe - I have succeeded in shortening him, and added a Ping and a Sharp analog distance sensor.
  • RsadeikaRsadeika Posts: 3,837
    edited 2014-07-20 04:51
    Here is a recap of what I have going at the moment, primarily I have the Create chasis which is being controlled by an Activity Board. I have the new RPi B+ which is being powered by a 10Ah power bank and it has the cable from the Activity Board pugged in. The RPi has the WiFi w/antenna module in the USB port and it also has the camera module plugged in. So, at the moment I just have two cables that I have to deal with, and they get stuffed into the cargo bay. So far so good.

    From a programming perspective, I am using C, which I have created a small UI program to control the Create, just the basic commands like foreward, backward, left and right. The UI is being accesed via the terminal which is part of SimpleIDE. After doing the basic testing then I will change the UI so it can be accessed by the RPi, probably something like adding 'term = simple_open(31,30,0,115200)' should make it avaible to a python serial program. At that point testing will be done with the python serial program with a command line interface.

    I am now using a Kubuntu 14.04 64-bit desktop which I use the krdp to connect to the RPi remotely, this seems to be working very smoothly. I am able to log in and program the Activity Board with SimpleIDE which is installed on the RPi. Also it gives access to program the RPi via python to get access too the Activity Board -> Create. At the moment everything is very simple, when I get into the GUI stuff then it should get very complicated.

    Hopefully after this exercise I hope there will be some ideas for a Robot Control System that will be able to control an Arlo and other robot chasis, not sure as to who wold be creating this new board though, I do not have the expertise nor the tools to take on something like that. Back to the essentials ...

    Ray
Sign In or Register to comment.