Hello,
Adafruit_BBIO.UART and Adafruit_BBIO is deprecated (sort of)...# The Motor Cape has been taken out of rotation for Capes being used w/ .dtbo support. I am sorry.
This is a Mask of components and software that I put together w/ a couple amounts of time. I hope you enjoy it.
...
I am also not sure this exact bot is available any longer: http://www.lynxmotion.com/images/html/build06a.htm and yes, it is http and not https for whatever reason.
Also...listen to the instructions. It gets complicated as most things mechanical!
First, I purchased a BBB and then a BBGW (BeagleBone Green Wireless). I ended up developing machines and ideas from those two purchases. Good luck to me, right? Anyway...the trials and learning persisted and I am here now to introduce something I have put together for enjoyment purposes that can be used to dictate location of specific machinery, e.g. machinery that moves.
Second, I put a mini bot together to learn and failed miserably many times over and over again. Finally, some years later, I learned things and found out that portions of ideas are just that...they are just portions of ideas. Sometimes it takes pursuit and knowledge.
Starting from scratch in this field is not easy, i.e. even w/ Open Source software and ideas circulating around the Internet.
Anyway, time to get to it.
...
- Get all your components!
- Research the books and ideas.
- A couple good starter books are "Getting Started with BeagleBone (Richardson 2013)" and "BeagleBone by Example (Prabakar 2016)."
- Get a fresh update from https://forum.beagleboard.org/t/debian-10-x-11-x-kernel-updates/30928 and this gives a way to upgrade and update the kernel! https://forum.beagleboard.org/t/debian-11-x-bullseye-monthly-snapshots/31280 is another page on their forums to get an updated image.
- Use this guide, https://beagleboard.org/getting-started , to set up the chosen image w/ balenaEtcher. You will have to download Etcher from https://www.balena.io/etcher/ if you are on a Windows Host Computer. If you are using a Linux Distro for your development, say Ubuntu or Debian, you can use the Etcher software also...
- sudo apt update && sudo apt upgrade
- If you are using a SD Card, the full capacity of the SD Card will inflate after a reboot or by using this command: sudo shutdown -r now
- Okay...that ends set up for now.
- Next, we need to set up our software on the BBGW or the BBBW (for no GPS module via the Grove Connectors) and attach the hardware. Luckily, for our sake and for convenience, the MotorCape and Grove GPS will fit in nicely w/ little effort.
- Attach your MotorCape to your BBGW and the Grove GPS to the Grove UART connection on the back of the BBGW.
- Oh! Make sure you do not "hot plug" items in your BBB family boards or any piece of hardware for that fact. "Hot plugging" is just attaching peripherals to your board when the board is powered.
Updates...
This
source
no
longer
works...
Try another method for source w/ the L298!
I am sorry but Adafruit_BBIO has been sort of deprecated for now or forever.
- Software: Go to https://github.com/silver2row/motocape to get some easy software to comprehend and make things work. Do not be afraid to try out new methods and applications w/ your set up. This is my GitHub.com page online and I used this bit of software at a local Maker Faire in March. You can see in the main Python software, https://github.com/silver2row/motocape/blob/master/MotoCapeIII.py, we are using Adafruit_BBIO and Flask alongside Python. Adafruit_BBIO will allow us to manage our pins and connections while Flask will be a specific type of microservice server for reaching online connections at a specific address on the 5000 port.
- Also, you will need to create a, if you are not using the silver2row/motocape/ software directly, a templates directory in your current directory.
- Once in your templates directory, make a HTML file called whatever you want as long as you point to it w/ your Python-Flask application. You can see the MotoCapeIII.py software on the end of the source code where we are stating return render_template("boboIV.html", **template_data) where boboIV.html is our HTML page in the templates directory.
- Now...we need to create a simple bootable piece of software w/ a .service file.
[Unit]
Description=Whatever You Would Like to Describe about Your File
[Service]
ExecStart=/The/Path/To/Your/File.py
[Install]
WantedBy=multi-user.target
- So, again w/ your favorite text editor, type the above info. into your .service file at this directory: /etc/systemd/system/yourFile.service and call your .service file something you can remember.
- Next, enable and start the .service file in the terminal w/ these commands:
sudo systemctl enable
yourFile.service
. Then, the start of the .service file w/ this command,sudo systemctl start yourFile.service
, to make sure we can see its status on the terminal w/ this command:sudo systemctl status yourFile.service
. - Now, reboot! This, when ran, should show our .service file working:
sudo systemctl status yourFile.service
. - Next, we need to get the program Google Earth Pro at https://www.google.com/earth/versions/#earth-pro to be able to make our routes from our RoverBot able to be seen in Google Earth Pro. If you are using a cell phone w/ cell service, either 3G or 4G, to look at your mappings w/ Google Earth Pro, please make sure you pick the Google Earth on Mobile or if you have a plan w/ your Laptop Computer and an inverter for use, you need to pick the desktop version. Oh and you can always view the Earth w/ Google Earth Pro in a Browser.
- From your uart2 connection from the BBGW, any GPS source will work as long as you can use the UART2 peripheral on the BBGW in the source.
- So, w/out further waiting, I am sad to announce that Python 2.x.x has been deprecated. There is not a way, from python.org, to get it on a computer for Bullseye. There are ways but it is not a full-featured python. Stick w/ Python3 for now!
- This means, we must be a savvy user and find new paths, i.e. a "hack" if you will.
- But, since we are here, the software is found here: https://github.com/silver2row/bbgwGPS/blob/master/GPS.py. You can see we are importing Adafruit_BBIO.UART as UART and serial. I have come across many errors recently b/c this software was intended for Python2 only.
- So, since Adafruit_BBIO and their source for interacting w/ the UART on the BBGW is obsolete, we need to use another form of a client.
- I say: https://gpsd.gitlab.io/gpsd/
- We can use their gpsd client to handle GPS from the UART on the BBGW. It seems complicated at first if you are new to gpsd. Just remember:
REBOOT THE GPSD CLIENT TO CREATE A WORKABLE INSTANCE THAT CAN BE READ!
Like:
sudo systemctl restart gpsd.service
- If you are a file person that knows how to manage files well, have at this software and change it to suit your needs. No warranty!
- Enjoy!
- We should also have control of a bootable config. file called a .service file for this software and for the gpsd software.
...
So, we can track our "Monster" of a bot down slopes, up banks, and through the river beds. If you are having an issue controlling your bot or having an issue w/ your GPS working, do not hesitate to contact me.
Seth
P.S. If you want to set up a server w/ linode.com and use apache2 or nginx, use /etc/apache2/sites-available or /etc/nginx/sites-available, and set up your own.conf file.
Next...adding info. to your site: You can look online a w3schools.com and find some non-licensed software from them w/ a bunch of additional info. on front-end programming.
Next...go to /var/www/html/.
Use this command: nano index.html. This will help you alter your index.html file to suit your needs. If you plan on hosting the site w/ linode.com, you can find plenty of their housed tutorials on ideas plus you can always go to the source, e.g. ubuntu.com or Debian.org.
Next...See here if you need host the site on a home server: https://help.ubuntu.com/lts/serverguide/index.html.en. This is a very nice tutorial.
...
Both wikis on both sites are good, i.e. community and professional.
...
I think this may be beyond the scope of this small presentation but you can look to adding your blah-blah.com site, where blah-blah is the name of your chosen site, to linode.com for hosting w/ a www record w/ your listed, public IP Address.
Next...use the cname record to add your host name (IP Address) to your aliases (website address)/blah-blah.com or whatever it may be at the time.
Aw!
Comments