tomcat53
Posts: 20
Joined: Thu Dec 28, 2017 6:26 pm

Waveshare AlphaBot2

Fri Dec 29, 2017 5:55 pm

Simple question.

Does anyone have experience with the AlphaBot2? Does anyone have a script that allows it to be controlled through a web interface. I need the wheels, the camera servos and a camera stream to be controlled remotely. Thanks.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Waveshare AlphaBot2

Fri Dec 29, 2017 8:19 pm

I'd have guessed your best starting point would be https://www.waveshare.com/wiki/AlphaBot2-PiZero
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

tomcat53
Posts: 20
Joined: Thu Dec 28, 2017 6:26 pm

Re: Waveshare AlphaBot2

Fri Dec 29, 2017 9:00 pm

Thanks.

Been there done that. I've even e-mailed their customer service. They pointed me to that wiki. Not very helpful since I had already found it, downloaded their full of typos and badly translated from Chinese manual. (I even printed it!)
I've also contacted the store's customer service and they have directed me to the same bloody wiki. I might not know much about coding, but I'm no that stupid! :)

If the wiki were that helpful I wouldn't be here asking for help. :D

mattmiller
Posts: 2243
Joined: Thu Feb 05, 2015 11:25 pm

Re: Waveshare AlphaBot2

Fri Dec 29, 2017 9:38 pm

I've got a lot of robots and never heard of that one so your probably out of luck in getting any knowledgeable help

Maybe we can do baby steps tho

Can you get it to do anything simple like move

If so - how - via a program or via a remote ir controller?

mattmiller
Posts: 2243
Joined: Thu Feb 05, 2015 11:25 pm

Re: Waveshare AlphaBot2

Fri Dec 29, 2017 9:43 pm

I've never used a web app to control a robot but I'm thinking you want basically the equivalent of a remote control but on an tablet/phone screen?

You'd have to look inside the code they've provided - test to see if it runs those native python progs OK (to test the hardware) then reverse engineer them to find out what the author has used to make things happen - then write a web app to interface to them (20 ways of doing that)
A LOT of work possibly :(

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Waveshare AlphaBot2

Fri Dec 29, 2017 11:00 pm

What's the interface written in? Do you have working code to drive your robot round the room from a commandline/LXTerminal window?

Looking in the Raspberry Pi code at https://www.waveshare.com/w/upload/e/ee ... t2-Demo.7z there's a copy of WebIOPi included in there so I'd assume they're using that to give you browser control of your robot.

sudo apt install p7zip
cd /tmp
wget https://www.waveshare.com/w/upload/e/ee/AlphaBot2-Demo.7z
7z x AlphaBot2-Demo.7z
cd AlphaBot2-Demo/Raspberry\ Pi/
cp AlphaBot2.tar.gz /tmp
cd /tmp
tar xavf AlphaBot2.tar.gz
mv /tmp/AlphaBot2 /home/pi


There's a Web-Control folder in that stuff, it needs sudo pip install bottle to get it working.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

tomcat53
Posts: 20
Joined: Thu Dec 28, 2017 6:26 pm

Re: Waveshare AlphaBot2

Sat Dec 30, 2017 4:31 am

Hi,

I can get everything to work just fine manually. I open terminals run the mjpg streamer, run the web-control from another. Use my IP address to control the robot from a web interface. I just wanted to make it more plug and play for my son who has even less of a clue about coding than I do. Hence all my questions about running scripts on startup.

So far, I can get the web-control script to run on startup. The shell script executing the mjpg streamer is giving me a tough time. I thought I could launch it using a button connected to a gpio pin. This way all he would have to do is turn the robot on, press the button to start streaming and "spy" on his big brother.

No matter what I try, I can't get the shell script to run from inside a python script. Like I said, I'm only on day 4 of my Python adventure. I learn a lot from copying and adapting scripts I find online. The only thing I managed to do is print camera on when I push the button the first time and print camera off when I press the button a second time. I can get a python script to run at the push of the button, I can't get it to stop, though. When it comes to the streamer shell, no luck.

User avatar
DougieLawson
Posts: 39124
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Waveshare AlphaBot2

Sat Dec 30, 2017 6:11 am

I can't see any value in running shell scripts from python.

Run it in a shell.

Write new code in python to run the same function.

Write new code in bash script to do the missing things.

Mixing them is an advanced topic that I'd avoid where possible, as it's an ugly PITA.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

felipe.o.gutierrez
Posts: 6
Joined: Tue Aug 07, 2018 8:36 am

Re: Waveshare AlphaBot2

Tue Aug 21, 2018 10:53 am

Hi @tomcat53. I am not getting the AlphaBot2 to work even manually. Do you know how to troubleshoot the python software?
If you could help with this thread (https://www.raspberrypi.org/forums/view ... 7&t=220922) I appreciate very much.

Thanks,
Felipe

aerosquirrel
Posts: 1
Joined: Wed Dec 19, 2018 5:46 pm

Re: Waveshare AlphaBot2

Wed Dec 19, 2018 5:51 pm

I'm working through a new setup of an AlphaBot2 (pi zero), and am running into issues with the LED/photocel line following demo code. No matter what I install, I cannot get the code to find the neopixel library in order to run. Any suggestions? Can the LED's be accessed directly instead?

Is there an informal user developed manual for the AlphaBot? I'll be writing my own code and need pinout definitions. I've been trying to reverse engineer it from the sample code.

Thanks!

Return to “Advanced users”