Skip to content

and900/Amytol_Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

All My Things Online

Logo

An awesome sample code to jumpstart your knowledge!
Explore the docs »

View Demo · Report Bug · Request Feature

AMYTOL Samples

AMYTOL created Library and Sample Code for you to get started
This library is designed to easily access a variety of functionality.

WIRING AMYTOL Examples

The Ultrasonic sensor uses the provided library NewPing no need for an additional library
Wiring for the NewPing version of the Ultrasonic device is:

Connector Pin Wire Colour
J8 GROVE Ultrasonic

WIRING AMYTOL_NexGen_ Examples

This program assumes wiring for the H-Bridge motor driver inputs
and allocation of Arduino output pins are as outlined in the tables below.

Grove Connectors

Grove Connector Grove Pin Wire Colour To Motor Driver Arduino Pin Notes
J1 1 Yellow PWM A 2 Left Motor PWM duty cycle for Speed
J1 2 White DIR A 3 Left Motor for Direction
J1 3 Not Used Not Used
J1 4 Black Not Used
J4 1 Yellow PWM B 5 Right Motor PWM duty cycle for Speed
J4 2 White DIR B 6 Right Motor for Direction
J4 3 Not Used Not Used
J4 4 Black GND
J3 Ultrasonic
J8

Motor Driver Outputs

From Motor Driver Motor Wire Colour
A+ Left Motor Red
A- Left Motor Black
B- Right Motor Red
B+ Right Motor Black

Author

Created by Andrew Morgan September 8th 2023 All My Things On Line AMYTOL wwww.AllMyThingsOnLine.com

Description

This is an Arduino library to demonstrate how you to extend the functionality of Arduino C+. Pin configuration is stored in the Construction file called by yhe constraint Libary autocomplete prefix is "rbt"
ArduinoWorkspace --- /
AMYTOL_Robot/ ----+ /
examples/-------- + AmytolRobot.ino
src/ -------- + AmytolRobot.cpp
+ AmytolRobot.h

Initalise

Rbt rbt (007); Secret Agent Pin Delaration

Fixed Variables

Variable Name and Value
BATTERY_PIN = 0
ultrasonicPin = 7
buzzerPin = 8
touchSensorPin = 9
buzzer = 8
fast_speed = 255 milliseconds
medFast_speed = 240 milliseconds
medium_speed = 150 milliseconds
medLow_speed = 140 milliseconds
slow_speed = 80 milliseconds
tenthofaSecond = 100 milliseconds
halfaSecond = 500 milliseconds
oneSecond = 1000 milliseconds
twoSeconds = 2000 milliseconds
fiveSeconds = 5000 milliseconds
num_times_to_repeat =1
WARRANTY

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.