Wednesday, November 29, 2017

Module 13


Step 1: Demos (individual)
Nate Barone: https://docs.google.com/document/d/1B8NZxYkHGcQ9MHG5C8Zvap_XiYREHouJ14A3ts8qvcA/edit?usp=sharing

Lucinda Cahill: https://docs.google.com/document/d/12yMYK3DI3xvb1Kx6HPOytUgynOTWpLCqtZQJri00nkE/edit?usp=sharing

Stephen Bade:
 https://docs.google.com/document/d/1i9K-mfpeExoXF2faYqwFrSiLdMXSlZzmZ_4Rx4r5kvA/edit?usp=sharing

Ryan Munro:
 https://docs.google.com/document/d/1Cf8V0ZdXN-XbnNVNsZauETOe6Fi5vzAEZ03iZ3jQHc4/edit?usp=sharing


Step 3: Blinking and LED

Nate and Lucinda's Tutorial

Part 1- setting up the LED on the board
1) Take an LED and a 220 resistor.
2) Using an alligator clip connect one side of the resistor to the longer side of the Led.
3) Place the end of the resistor without the clip into the Mega2560 board in pin number 10.






















4) Place the shorter side of the pin into the Mega2560 board in the pin 'ground' (GND)






















Part 2- writing the code
pin mode: 10, output - pin 10 is the output
Digital write: 10, high- voltage is high to pin 10
delay: 1000- wait for 1 second
Digital write: 10, low- voltage is low for pin 10
delay:1000- wait for 1 second
Click the tick to make sure your code is correct (this will not guarantee that it will work but just checks for any errors in the code)

 




Stephen and Ryan's Tutorial
1-Plug the circuit board into your computer using the USB cable, a green light should turn on indicating the board is connected.
2- Get one LED and one 1k resistor and connect the long end of the LED to the resistor using an alligator clip.
3-Insert the shorter LED end into the ground port (GND) and the other end of the resistor into port 10
4-Open your MyBlink program in Arduino and change the ouput on all of the  program to port 10 indicating the LED will be the light that turns on

5-Check and verify your program and then upload it and see if it works.(LED should start binking)


Step 4: Multiple Blinking LED

Nate and Lucinda
1) Connected two loops to the same ground
Blue light in pin 8 and red light in pin 10
Very hard to see the blue light flashing as the loops are connected.





2) Connected each loop to a seperate ground
Blue light in pin 8 and red light in pin 10
Each light is a lot stronger as there are two seperate loops


3) Multiple Lights in series

Stephen and Ryan







Step 5: Christmas Trees with Lights

Lucinda and Nate



Ryan and Stephen







Wednesday, November 15, 2017

Module 12

Last minute problems:
- backs up too far
- turns too long
- starting turn didn't have enough momentum forward and turned on a very small axis
- infrared sensor isn't sensitive enough. It needs to be changed to sense objects further away
- turn at beginning is a little too large. If we make the turn less then the robot will be able to attack robots that do not move a lot at the beginning
- Infrared sensor detects something all the time. We need to change the range at which it detects objects.

GLAMOR SHOT

















Why the Kanga Destroyer will win?

The ramps at the front of the robot are directly on the ground which will allow the robot to get under other robots and throw them off. They are sturdy and will not break under pressure and will aid in making our robot win. We are using 3 sensors; infra-red, touch and color. By using all 3 sensors our robot is extra sensitive to both other robots and the ring in which it must stay. By placing the touch sensor on the back and the infra-red sensor on the front our robot can sense objects from both in front and behind and therefore change its course to get out of the way. Our plan is to use many split loops to maximize the intelligence of our robot, giving the Kanga a greater chance at success.


Photos/Video












How did your SHUmo Bot do?

Our SHUmo Bot won the entire event, losing only one best of three. We believe this is because we kept everything simple within our code. Boiling it down to the basics, our robot was just coded to charge forward in the beginning, followed with turning in place to try and locate the other robot with the IR sensor. At any point in this code, if the other robot ever entered within the proximity threshold of our IR sensor, our robot would charge forward. We also made our robot have a ramp at the front of it; looking back at the video it is obvious that this ramp helped us win. Combining these factors together, we were able to win against almost every opponent, no matter the strategy they choose.


Wednesday, November 8, 2017

Module 11

Individual google docs:

Lucinda Cahill- https://docs.google.com/document/d/1_eQkWvifmf-RLR78NE23NG_6Q7bmZ4li8I4ai5dEHc0/edit?usp=sharing

Nate Barone- https://docs.google.com/document/d/1_3Tsz8wh2wxHZNX9B_NZHYQocRvexIPb-oRduesSGGE/edit?usp=sharing

Ryan Monroe: https://docs.google.com/document/d/1E4D7NsC0SNoI7c26BpLpRlcFyhlEsyxhakdgteY_0Gw/edit

Stephen Bader: https://docs.google.com/document/d/1lNihhzg0g_b2ayTtW3lu4Alm3P_T9GIrFNnXkUtv8is/edit?usp=sharing


New Design: 


Strategy: Our robot will firstly search for a white line (outer ring of arena), if it detects the white line it will quickly reverse, spin around and proceed forward. If it does not detect the white line (anywhere else in the arena) it will search for objects in front of the infrared sensor that are less than 50 units away. If an object is detected within 50 units it will move forward towards that object at full speed (100 units). This strategy will enable our robot to hopefully push the other robot out of the arena. If the robot does not sense an object within its proximity threshold it will check its touch sensor, which is located on its back, to search for its next set of instructions. If it does sense that it is being pushed from behind (by another robot) it will turn sharply with both treads at +100 and -100 respectively. This will allow the robot to move out of the path of the attacking robot. If it does not sense anything touching it from behind it will spin in one spot to locate the opposition robot. If it sees a robot with its infrared sensor it will begin at that part of the code again.

Step 5:
What Went Well and What Went Wrong
Our robot was very good at keeping itself inside the ring. On top of this, our robot also was good at turning and pushing of other robots. Our main problem is that our code starts it out spinning, thus allowing the other robots free access to push it from behind. This is simply changed by adding a delay to our code so that it faces forward while the other robot it charging forward at us.

Next Step Next Week
Firstly, we must change a couple of our values inside of our functions. This issue was something expected as we are unsure of the relation of the units inside the program to distance of the arena. Outside of this, we also are going to add a code to the start as our beginning is a struggle. Our code was more aimed at the mid-game of the fight and we forgot about the starting line fight.

Wednesday, November 1, 2017

Module 10

Step 1: Touch Sensor Intro


Make your robot respond to touch


Step 2: Move Steering with Touch Sensor


Move steering Block


Step 3: Colour Sensor

Example 1
Example 1 wanted us to create a colour sensor code that was a solid bright orange colour until an ambient light intensity greater than 50 was introduced. Once this happened, the orange light was meant to then flash on and off until the light intensity then went back under the threshold. In the end this program was unable to work as our colour sensor was never able to get above and then back under this desired threshold. 

Example 2
Example 2 wanted to create a colour sensor code that stopped the robot from spinning. If it did not detect a reflected light intensity < 50 and motor B had already rotated 2000 degrees, it would also stop. We were also unable to get the colour sensor to locate a light intensity above the threshold, causing each of our test runs to stop after the robot rotated 2000 degrees. 

Step 4: Infrared Sensor
Example 1


Example 2



Step 5: Coding Challenges 
Moving in a tight circle


Challenge 2:
We were unable to make the robot roam around the room randomly but what we created, in code only, was that the robot moved forward at a slow pace until it sensed an object infant of it at around 50 units. then it would stop and start turning to the right until it no longer sensed an object in front of it. Then it would begin moving forward again until another object appeared in front of it.

Challenge 3:
We created a code that allowed the robot to roam forward until the colour sensor met with a white line. To do this we made the robot just move forward until a white colour was introduced to the colour sensor. Our problem however was that the colour sensor was unable to figure out the colour white from all others, causing our robot to cross the line and never stop moving.

Challenge 4:
We created a code that made the robot move forward until it met with a white line, the colour that outlines the Dohyo arena, and when it did it rotated a 120 degrees. This degree was created so that it would roam around the circle in an "unpredictable" way so that it didn't bounce back in forth in a straight line as it would if we chose 180 degrees. This also did not work because our colour sensor was unable to figure out the difference between the red and white colours of the Dohyo. This caused our robot to continue moving forward and fall right out of our test area, which in the real event would be the Dohyo itself.