ANcybernetics
Published © CC BY-NC-SA

Wally: a new friend for oncological patients

Wally supports young cancer patients and their families during long-hospitalisation through edutainment activities.

BeginnerFull instructions provided30 minutes165
Wally: a new friend for oncological patients

Things used in this project

Hardware components

M5StickC PLUS ESP32-PICO Mini IoT Development Kit
M5Stack M5StickC PLUS ESP32-PICO Mini IoT Development Kit
×1
Ultrasonic Distance Unit I2C (RCWL-9620)
M5Stack Ultrasonic Distance Unit I2C (RCWL-9620)
×1
M5Stack Servo Kit 360° Brick-compatible
×1
M5StickC 8-Channel Servo Driver HAT
M5Stack M5StickC 8-Channel Servo Driver HAT
×1
LEGO Technic Pin Long
×2
LEGO Technic 1x5 Thick Liftarm (32316)
×1
Rubber bands
×2
Ball caster
×1

Software apps and online services

M5Stack M5Flow

Story

Read more

Schematics

Wally: Hardware and Sensor Connection Diagram

Code

Basic Movement Program for Wally

Python
This code is written in Python for clarity, but the same logic can be implemented using block-based programming in UIFlow.
from m5stack import *
from m5ui import *
from uiflow import *
import unit
import hat
 
 
setScreenColor(0x111111)
Ultrasonic_0 = unit.get(unit.ULTRASONIC, unit.PORTA)
 
hat_8servos_0 = hat.get(hat.SERVO8)
 
hat_8servos_0.set_pwr_ctrl(1)
while True:
  if (Ultrasonic_0.distance) > 150:
    hat_8servos_0.write_servo_angle(2,0)
    hat_8servos_0.write_servo_angle(4,180)
  else:
    hat_8servos_0.write_servo_angle(2,90)
    hat_8servos_0.write_servo_angle(4,90)
  wait_ms(2)

Credits

ANcybernetics
1 project • 1 follower
ANcybernetics develops innovative robotics programs for STEAM education and applies tech to support marine science research.

Comments