-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Timberman.md to examples #65
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Timberman | ||
|
||
**Playstore Link:** [Timberman](https://play.google.com/store/apps/details?id=com.dm.timber&hl=en) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Images missing. Add images to the /Images folder and use them here. See this as an example: https://github.com/GameAutomators/eBook-Source/blob/master/Examples/05-ready-steady-bang.md |
||
##### About the game: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the same subheadings as https://raw.githubusercontent.com/GameAutomators/eBook-Source/master/Examples/05-ready-steady-bang.md. You should have Game Description here. |
||
Timberman is an oldschool arcade style casual game. You have to put on your checkered shirt, pull up your sleeves, pick up the sharpened ax and ... grow a beard. In a moment there will be splinters flying and knocks off ax will bear echoed through the forest. Show how quick and how efficiently you can cut down a hundred-meter tall pine tree. But be careful, work of a lumberjack is tough and it's not hard for the accident at work. In addition, time is chasing you in every step not giving even a moment to rest. | ||
|
||
##### Difficulty Level : | ||
Easy | ||
|
||
##### Overview | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be h3 and not h5. Use three ###. To learn more, see the example: https://raw.githubusercontent.com/GameAutomators/eBook-Source/master/Examples/05-ready-steady-bang.md |
||
As soon as the timber branch appears above the timberman, the voltage output from the pin where the LDR is connected decreases. Whenever a drop in voltage is detected, the output pin is set to LOW and thus the Relay output is connected to ground which is equivalent to a 'Touch' on the other side of the side bearing lumberjack. In the absence of branch overhead, repeated touch is simulated on the same side of lumberjack. | ||
|
||
##### Requirements | ||
* An Android Device with the 'Timberman’' game installed on it. (Turn on the Developer options for better visualization) | ||
* Arduino, Breadboard, 22k Resistor X 2, LDR, Relay X 2, Connecting wires, two conducting metal coin | ||
* Computer to program Arduino | ||
|
||
##### Block Diagram | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Learn to add images from here: https://github.com/GameAutomators/eBook-Source/blob/master/Examples/05-ready-steady-bang.md |
||
|
||
##### Circuit Diagram | ||
|
||
|
||
##### Tutorial | ||
Here's the step-wise tutorial to automate the game. | ||
|
||
**Step 1: Sensor placement** | ||
|
||
The LDR is fixed on the screen exactly above the head of the wood-cutter on the left side. When the branch appears, the intensity of the light from the screen being detected by the LDR decreases. | ||
|
||
**Step 2: Touch simulation** | ||
|
||
The coin is placed on the screen and the output from the relay is connected to it. When the relay output is grounded, it simulates a touch on the screen and when it is open circuited, it withdraws the touch. | ||
|
||
**Step 3: Arduino code** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only have important parts of the code here, and explain them in text. |
||
|
||
Initially, set the output pins | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mention it as
and not just ``` so that the syntax highlighting gets activated. |
||
int left=4,right=5; | ||
``` | ||
``` | ||
void loop() { | ||
int sv = analogRead(A0); //read the input on analog pin A0 | ||
Serial.println(sv); //print out the value you read: | ||
//When a branch is encountered, right tap two times (until then, the branch disappears) | ||
if(sv<750) //threshold value=750 | ||
{ | ||
digitalWrite(right, HIGH); //simulate no touch | ||
delay(700); | ||
digitalWrite(right, LOW); //simulate touch | ||
delay(700); | ||
digitalWrite(right, HIGH); //simulate no touch | ||
delay(700); | ||
digitalWrite(right, LOW); //simulate touch | ||
delay(700); | ||
} | ||
else //otherwise keep tapping left | ||
{ | ||
digitalWrite(left, HIGH); // simulate no touch | ||
delay(300); | ||
digitalWrite(left, LOW); // simulate touch | ||
delay(300); | ||
} | ||
// delay(100); // delay in between reads for stability | ||
} | ||
|
||
##### Conclusions | ||
|
||
This way, the the circuit plays the game for us. Because the reaction time of the circuit is very fast, it can make highscores! | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be h2 which means you should have "##" and not "#"