Skip to content

Commit

Permalink
Tidied spidertank and added showcase readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ZodiusInfuser committed Nov 14, 2023
1 parent 401ca32 commit 3410a50
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
26 changes: 26 additions & 0 deletions examples/showcase/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Yukon Micropython Showcase Examples <!-- omit in toc -->

This folder contains a collection of *Showcase* examples, that bring together concepts presented by individual board and module examples to create functional projects.

- [RC Rover](#rc-rover)
- [Spider Tank](#spider-tank)


## RC Rover
[rover/main.py](rover/main.py)

A showcase of Yukon as a differential drive rover. It uses two Big Motor modules, one to control the left side motors, and the other to control the right side motors.

There is a LED Strip module controlling left and right strips that represent each side's speed as a colour from green -> blue -> red. Additionally, there is a proto module wired up to a buzzer to alert the user to the battery voltage getting too low, which also exposes the UART for connection to a bluetooth serial transceiver.

The program receives commands from the JoyBTCommander Android App and converts them to motor speeds. it also sends the voltage, current, and temperature of Yukon back to the App.


## Spider Tank
[spidertank/main.py](spidertank/main.py)

A showcase of Yukon as a hexapod robot, with 3 degrees of freedom per leg. It uses two Serial Bus Servo modules, one to control the left side servos, and the other to control the right side servos.

There is also a proto module wired up to a buzzer to alert the user to the battery voltage getting too low.

The program performs inverse kinematics for each leg, with the target points following a tripod walking gait.
15 changes: 15 additions & 0 deletions examples/showcase/spidertank/lib/leg_ik.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
import math
from collections import namedtuple

"""
This file contains a collection of classes and functions for performing
the inverse kinematics (IK) of a 3 degree of freedom robot leg.
The central class of this implementation is Vector3, which is used to store
3D coordinates. The axes of these coordinates follow the left hand rule:
* X = right/left
* Y = up/down
* Z = forward/back
This IK implementation is derived from understandings gained by
Christopher "ZodiusInfuser" Parrott, during the development of:
https://github.com/ZodiusInfuser/TrueWalkSimulator
"""

Limits = namedtuple("Limits", ("min", "max"))


Expand Down
9 changes: 6 additions & 3 deletions examples/showcase/spidertank/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
from leg_ik import Vector3, calculate_ik_3dof, Limits, rotate_y

"""
This is a showcase of how Yukon can be used to drive a 3 degree of freedom hexapod robot.
A showcase of Yukon as a hexapod robot, with 3 degrees of freedom per leg.
It uses two Serial Bus Servo modules, one to control the left side servos,
and the other to control the right side servos.
There is also a proto module wired up to a buzzer to alert the user to the battery
voltage getting too low.
There is also a proto module wired up to a buzzer to alert the user to the
battery voltage getting too low.
The program performs inverse kinematics for each leg, with the target
points following a tripod walking gait.
Press "Boot/User" to exit the program, only if the buzzer is not sounding.
If the buzzer sounds, disconnect power as soon as possible!
Expand Down

0 comments on commit 3410a50

Please sign in to comment.