Robo Cup 2019 (Student volunteer)

2 - 7 July 2019

Helped out as a referee for (Resue Simulation), more info on my LinkedIn

Robotic Arm workshop (Arduino)

15 July 2019

details:-

Below is the code uploaded into the Arduino board.

#include <Servo.h>

Servo fst;
Servo snd;

// the orange wire plugged in on the arduino board
int fstPin = 11;
int sndPin = 10;

// the wires from joystick plugged in on the arduino board
int joystickXPin = A0;
int joystickYPin = A1;
int joystickClick = A2;

// servo state
int fstAngle = 0;
int sndAngle = 0;

// joystick state
int joyStickX = 0;
int joyStickY = 0;
int joyStickPress = 0; 

void setup() {
  fst.attach(fstPin);
  snd.attach(sndPin);
  // joyStick 
  pinMode(joystickXPin, INPUT);
  pinMode(joystickYPin, INPUT);
  pinMode(joystickClick, INPUT);
  Serial.begin(115200); 
}

void loop() {
  // get input from board
  joyStickX = analogRead(joystickXPin);
  joyStickY = analogRead(joystickYPin);
  joyStickPress = digitalRead(joystickClick);
  // this prints output
  Serial.println(joyStickPress); 
  /*
   * map function that maps JoyStick to Servo
   * JoyStick 0 - 1023
   * Servo 0 - 255
   * If map function not used Servo will cycle 0 - 255
   */
   fstAngle = map(joyStickX, 0, 1023, 0, 255);
   sndAngle = map(joyStickY, 0, 1023, 0, 255);

   fst.write(fstAngle);
   snd.write(sndAngle);

   delay(1000);
}