Well,
I got this sucker to go and stop and go again. Good things come in odd packages.
Seth
P.S. If you are working with the Motor Bridge Cape, let me know. I sure could use some Python software advice.
I am trying to make a robotic mower for the BBG and MotorBridgeCape with some old parts, electronics, and/or stuff...enjoy.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Well,
I got this sucker to go and stop and go again. Good things come in odd packages.
Seth
P.S. If you are working with the Motor Bridge Cape, let me know. I sure could use some Python software advice.
mbcUseII.pystraight, turn, back to where I came from, turn, and repeat...plain - 3.33 kB - 05/07/2018 at 03:22 |
|
|
MBCV.pyMore ideas of python and motor usage...plain - 3.33 kB - 05/07/2018 at 03:21 |
|
|
DCmotor.pyWorking w/ DC motors...this is a Python file that goes in the same directory as the MotorBridge.py file. This software only controls one motor.plain - 531.00 bytes - 05/27/2016 at 17:08 |
|
|
MotorBridge.pyBasic Cape operations...plain - 12.06 kB - 05/27/2016 at 17:08 |
|
So,
Here we are again trying to make something that works well, work better!
Please view the video:
So, that is the bot but smaller. It is not a mower but has four, bidirectional DC Motors that work together to move the bot in an almost frictionless movement.
The software is here:
# /*
# * MotorBridge.py
# * This is a library for BBG/BBB motor bridge cape
# *
# * Copyright (c) 2015 seeed technology inc.
# * Author : Jiankai Li
# * Create Time : Nov 2015
# * Change Log : From #beagle on Freenode and my changes (Seth 2019)!
# *
# * The MIT License (MIT)
# *
# * Permission is hereby granted, free of charge, to any person obtaining a copy
# * of this software and associated documentation files (the "Software"), to deal
# * in the Software without restriction, including without limitation the rights
# * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# * copies of the Software, and to permit persons to whom the Software is
# * furnished to do so, subject to the following conditions:
# *
# * The above copyright notice and this permission notice shall be included in
# * all copies or substantial portions of the Software.
# *
# * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# * THE SOFTWARE.
# */
# FileName : MotorBridge.py
# by Jiankai.li
# w/ help from additions from #beagle on what used to be Freenode and me (Seth)!
from smbus2 import SMBus
import time
import pathlib
# reset pin is P9.23, i.e. gpio1.17
reset_pin = pathlib.Path('/sys/class/gpio/gpio49/direction')
reset_pin.write_text('low')
MotorBridge = SMBus('/dev/i2c-2')
ReadMode = 0
WriteMode = 1
DeAddr = 0X4B
ConfigValid = 0x3a6fb67c
DelayTime = 0.005
# TB_WORKMODE
TB_SHORT_BREAK = 0
TB_CW = 1
TB_CCW = 2
TB_STOP = 3
TB_WORKMODE_NUM = 4
# TB_PORTMODE
TB_DCM = 0
TB_SPM = 1
TB_PORTMODE_NUM = 2
# SVM_PORT
SVM1 = 0
SVM2 = 1
SVM3 = 2
SVM4 = 3
SVM5 = 4
SVM6 = 5
SVM_PORT_NUM = 6
# SVM_STATE
SVM_DISABLE = 0
SVM_ENABLE = 1
SVM_STATE_NUM = 2
# IO_MODE
IO_IN = 0
IO_OUT = 1
IO_MODE_NUM = 2
# IO_PUPD
IO_PU = 0
IO_PD = 1
IO_NP = 2
IO_PUPD_NUM = 3
# IO_PPOD
IO_PP = 0
IO_OD = 1
IO_PPOD_NUM = 2
# IO_STATE
IO_LOW = 0
IO_HIGH = 1
IO_STATE_NUM = 2
# IO_PORT
IO1 = 0
IO2 = 1
IO3 = 2
IO4 = 3
IO5 = 4
IO6 = 5
IO_NUM = 6
# PARAM_REG
CONFIG_VALID = 0
CONFIG_TB_PWM_FREQ = CONFIG_VALID + 4
I2C_ADDRESS = CONFIG_TB_PWM_FREQ + 4
TB_1A_MODE = I2C_ADDRESS + 1
TB_1A_DIR = TB_1A_MODE + 1
TB_1A_DUTY = TB_1A_DIR + 1
TB_1A_SPM_SPEED = TB_1A_DUTY + 2
TB_1A_SPM_STEP = TB_1A_SPM_SPEED + 4
TB_1B_MODE = TB_1A_SPM_STEP + 4
TB_1B_DIR = TB_1B_MODE + 1
TB_1B_DUTY = TB_1B_DIR + 1
TB_1B_SPM_SPEED = TB_1B_DUTY + 2
TB_1B_SPM_STEP = TB_1B_SPM_SPEED + 4
TB_2A_MODE = TB_1B_SPM_STEP + 4
TB_2A_DIR = TB_2A_MODE + 1
TB_2A_DUTY = TB_2A_DIR + 1
TB_2A_SPM_SPEED = TB_2A_DUTY + 2
TB_2A_SPM_STEP = TB_2A_SPM_SPEED + 4
TB_2B_MODE = TB_2A_SPM_STEP + 4
TB_2B_DIR = TB_2B_MODE + 1
TB_2B_DUTY = TB_2B_DIR + 1
TB_2B_SPM_SPEED = TB_2B_DUTY + 2
TB_2B_SPM_STEP = TB_2B_SPM_SPEED + 4
SVM1_STATE = TB_2B_SPM_STEP + 4
SVM1_FREQ = SVM1_STATE + 1
SVM1_ANGLE = SVM1_FREQ + 2
SVM2_STATE = SVM1_ANGLE + 2
SVM2_FREQ = SVM2_STATE + 1
SVM2_ANGLE = SVM2_FREQ + 2
SVM3_STATE = SVM2_ANGLE + 2
SVM3_FREQ = SVM3_STATE + 1
SVM3_ANGLE = SVM3_FREQ + 2
SVM4_STATE = SVM3_ANGLE + 2
SVM4_FREQ = SVM4_STATE + 1
SVM4_ANGLE = SVM4_FREQ + 2
SVM5_STATE = SVM4_ANGLE + 2
SVM5_FREQ = SVM5_STATE + 1
SVM5_ANGLE = SVM5_FREQ + 2
SVM6_STATE = SVM5_ANGLE + 2
SVM6_FREQ = SVM6_STATE + 1
SVM6_ANGLE = SVM6_FREQ + 2
IO1_STATE = SVM6_ANGLE + 2
IO1_MODE = IO1_STATE + 1
IO1_PUPD = IO1_MODE +...
Read more »
Hello,
I just configured the, and yes this has taken forever and a day, web application to work w/ the BBGW and the Motor Bridge Cape w/ the help of w3schools.com and a person on #beagle on Freenode.
...
I will promote this web application soon w/ Flask, Bootstrap, and HTML on github.com.
...
I have to set up git on my BBGW and then update the software on the GitHub.com page.
Seth
P.S. If you are more interested in this concoction of ideas, please contact me or wait longer to see what transpires.
Hello,
I got this thing put together and it can geaux. I am currently working with Flask, Python, BBG, and the Motor Bridge Cape from Seeed Studio to make this sucker hum.
I want to be able to write an application with Flask to make my motors understand what it is they need to know to geaux but geaux more than just geaux. So, I have to make a separate understanding on my behalf in the form of education.
I was thinking. I guess I could make a motor provide enough current to make the battery recharge but I am far away from this progress. Enjoy!
Seth
P.S. If you have any ideas, please let me know about your usage with Flask, Python, and HTML. I like to work with this dated yet useful packages/languages. Yea boy!
Hello,
I have been out of the funds to support my project. So, in hindsight, what I did was so worth it. I got a credit card, maxed it out, and went for broke. Now, I must pay some handsome interest. Boo! Anyway, this is the part that was worth it.
I got my parts, my software still needs work, and I can now say I am a part to the human dilemma of debt.
If you have any questions on the software, the Motor Bridge Cape, and/or anything in between, let me know. I have been working on this item for some time now and I have just about every quirk worked out.
Seth
P.S. I can run four motors off the Motor Bridge Cape with the correct software. What is listed is only for one motor and that software for the MotorBridge.py file needs to be altered to suit the needs of specific Debian-Linux distros. Let me know!
Seth
This is the "finished product" for now. I still need to cut some long spindle shaft and reattach it somehow, e.g. with the least vibration. I do not need a bouncing mower, i.e. just a Geaux Mower!
Create an account to leave a comment. Already have an account? Log In.
I think this idea works for now. I got two motors, a BBG, a Motor Bridge Cape, and some software. The build was not all my doing. I had help with the first start of the software from Seeed and their Wiki and the metal components are cut, drilled, and done all with some machine that I do not work on.
Yea boy!
Seth
P.S. I will post a video as soon as I figure out how.
SeeedStudio.com is where I found the BeagleBone Green and the MotorBridgeCape. I have been working with Linux distros and BeagleBone Blacks for a bit now.
I am just getting used to working with robotics more. So, sit back and enjoy the lower level expertise of me using electronics.
Become a member to follow this project and never miss any updates
I came across one issue. My shaft that spins to make the blade turn has two spindles, i.e. one on each end. The issue is that I am going to cut this at some point to make the length shorter. I only have about 12" to 18" to work with...
So, how in the hell am I supposed to attach these two sides, the sides of the spindles, together to get a smooth rotation of my blade? Heh? I know it is some mechanical engineering marvel but I just am going boinkers over this issue. Anyway, I will keep people updated.
Seth