New
#871
Just tweaking my keyboard rover file. And making sure I have the latest files backed up. I've been making it a habit to put a "#last edited on" line at the end of my python files. So I know which one is current. I have copies on One Drive and my PC, and my laptop and on a thumb drive. I try to keep the one on One Drive the one in use, and the one that's the latest version. Then I can just drag and drop it to the PC I'm using at the moment. It gets tricky some times. I have several different Weather Clock Python files and several different Rover Python files to keep track of.
Have to wait for my wife to get to go any farther. It's a bit of a pain to get the SD card out of the Pi Zero Rovers. I have the Pi's bolted into the cases and those cases don't have any access slots for the cards. Seemed like a good idea at the time lol. So that means hooking them up to my TV for a monitor and plugging in a keyboard mouse to do any file transfers and tweaks. I'll take them all apart one last time when I'm done, to make an image of the SD card. But until then I don't fancy disassembling them over and over again.
My only real control issue is they don't want to turn if already moving. I'm just slowing one motor / wheel down relative to the other to do that. Not enough though I guess? Or it (python) doesn't like how I'm doing it. No errors so I'm not sure what's going on. I think what I'll do is put a block of wood under it so the wheels are off the ground and see what happens with different edits of my code. Then save what works.
i think i see some rover type robots turning by having the front wheels go in opposite directions ,one forward one reverse depending on the direction you want to turn ....
as for keeping my files and sd cards in order, I'm lost
I have it set so if its stopped (not moving) the wheels go in opposite directions. It pivots on the spot. I don't want to do that if its in motion though, I want it to keep going but also turn a little one way or the other. I have code in there so its can't go right from forward to reverse too. It will tip over if you do that at speed. You have to stop first to switch to reverse, and vise versa. That's the plan anyway. Most of it works as intended. Going to play with it after lunch. Time to barbeque some hamburgers.
Yeah, that's its one big down side. I'm toying with reversing it. Wheels in front caster in the back. I'll have to do some tests running it in reverse to see if it turns and drives better. it should be less tippy that way, especially on carpet. If it does I'll look at reversing my mini hack3r board or moving the motors up front and caster in the back. Moving the motors is relatively easy. It has 4 mounting tabs 2 in front and two in back. I'd have to drill new holes for the caster though, that wouldn't be al that hard either. If I flip one chassis 180 on top of the other I could use the exiting mounting holes to drill new ones in the other chassis. Might have to move the battery though, not sure.
Revising isn't going to be as easy as I had thought. The motor power cables won't reach if I move them. The Explorer pHat is at the back, and the connections to that are at the back of it. Too much work to move things. I haven't given up on it, just not ready to tackle it at this time.
It would be doable if I had planed it from the start, well easier anyway, than switching tracks now. I have one fully usable with my mini keyboard. I ditched being able to change the speed and locked it into a set speed. It just complicates things and the motors don't run so well at low speed. They stall easier. It's usable as a toy for the grand kids to play with.
Now its time to move on to no 2 and see if I can get it working with my blue tooth controller. If that works out as planed, I'll get another one and ditch using the keyboard on the first one. I'll work on that some time this week. An hour or two a day hopefully.
I got evdev installed and running on Rover2. Linked my Bluetooth controller and got some codes. I'll have to find the right mode though. That controller has 4 modes. Mouse Mode, Media Center Mode, and two game modes. They each behave differently and change the button mappings.
I think its going to end up being one of the game modes. I'm hoping to have the rover move when the thumb stick is moved, and stop when it returns to center position. It's spring loaded and returns to center when released. Other wise I'll have to make one of the buttons a stop button. It seems to give two codes, one for a button pressed and one when released. Same for the thumb stick "when in game mode". It does some weird things when in Mouse of Media mode. It repeats the code over and over as long as the stick is moved off center. In game mode it just sends the one code. That's how it looks anyway. I had to stop and do some chores around the house. =(
I'll fire it back up for another go latter today or tomorrow. Nail down what mode I want and go from there. Pi booted up OK on the second rover. My shutdown button worked too. Haven't tried to run the motors yet. I may just swap the Pi from the other rover and do a quick test run. That's easy to do, just unplug and plug back in to rover 2. I had disassembled two of them and taken some gears out so they free wheeled. That didn't work out as planed so I put them back in. I don't think I've run them again since though? The bits only fit in one way so they should be fine. They spin OK with wheels on them and make that motor sound, lol. Not really sure which two motors they were now? I put them all in the same box.