-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplification #17
Comments
Alas, I don't have access to the robot now. I can try it when I do, but that could be a long time. The code looks lovely! |
After the install the link fails: This helps. Is there a way to use the HiTechnic Gyro in ev3devlight? |
There is now support for analog sensors. Repeat the installation instructions to update. To use the HiTechnic for now, mount the sensor like this, and replace:
With:
In the future I might add the HiTechnicGyro class to ev3devlight. For now I intended to support just LEGO sensors. |
Thanks. I recommend to use micropython, though. Running a program takes just seconds. |
I should also add that this is quite experimental so far, and just intended for those who like to code segway robots 😄 |
If there is a workarond - fine by me. Will try possibly today.
Will even look at micropython (so we get all the speed we can get out of the little baby) and by your latest comment, I am well at my place here :-)
Thanks Laurens, |
All you'd need to do is:
or run it from vscode. Because of the comment at the top:
micropython is automatically used in both cases. |
Got the EV3-gyro sensor and tried your current code including the remote steering. First testing on soft-floor (easier for the bot to survive a hard drop). Stopped WIFI and these services: Ran on hard floor (Vynyl) for about 15 minutes.
Maybe this error occurs after the drop. After dinner will look at services still running and try again. |
Thanks for trying it out.
It shouldn't be necessary to stop any services as the program has ample
idle time. My Bluetooth was on all the time with no issues.
It's meant to run on a hard floor. If you're worried about damage, you
could also consider mounting some LEGO tyres on either side of the robot.
The file io error may have been caused by a cable briefly disconnecting
during the fall impact.
I'll do some more testing to see whether I still see any falls.
However, I'd say that it's good news that you were able to run it stably
without any tuning.
Laurens
…On Tue, Apr 17, 2018, 19:14 Bert ***@***.***> wrote:
Got the EV3-gyro sensor and tried your current code including the remote
steering.
First testing on soft-floor (easier for the bot to survive a hard drop).
Few minutes and jerky movements (Dutch: schokkerig).
Maybe I still have too many services running.
Stopped WIFI and these services:
nmbd.service, smbd.service, bluetooth.service, ev3-bluetooth.service,
avahi-daemon.service
cron.service atd.service ntp.service bluetooth.service
Ran on hard floor (Vynyl) for about 15 minutes.
Less jerky, looking stable, sometimes recovering a bit jerky but mostly
stable. When I was not looking it dropped. the
ev3devlight/segway.py.err.log log contains:
Traceback (most recent call last):
File "/home/robot/ev3devlight/segway.py", line 77, in <module>
File "/home/robot/.micropython/lib/ev3devlight/sensors.py", line 117, in rate
File "/home/robot/.micropython/lib/ev3devlight/fileio.py", line 17, in read_int
OSError: 6
Maybe this error occurs *after* the drop.
After dinner will look at services still running and try again.
Was tempted to stop brickman.service but that makes running the test
rather difficult ;-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALwVYRjESZu2ESV0JY_XRgvcgRAq5aa3ks5tpiLagaJpZM4TC4F2>
.
|
I'm currently working on a new version of the code which is a bit more pythonic. Feel free to give it a try if you're interested.
The whole control loop is now about 10 lines of code. The full code is here.
For now only the EV3 gyro is supported. I haven't scaled for battery voltage yet, so the tuning may not work for you right away. But with simpler code, it's hopefully easier to modify on your end.
The code uses ev3devlight to interface with the hardware, which is a python3 and micropython compatible library. See this for installation instructions.
It doesn't have all the ev3dev functionality, but it takes only a few seconds to load. It's also faster for reading sensors and controlling motors.
The text was updated successfully, but these errors were encountered: