Category Archives: Miscellaneous

Arduino Code for my Gyrocar Toy

After so many requests of my code of my Gyrocar Toy on my YouTube channel. I decided to post my code here. This code is very primitive as I want to keep everything as simple as possible. Here is the complete code:

#include <Servo.h>

Servo myservo;
int potPin = 2; // select the input pin for the potentiometer
int val = 86;   // variable to store the value coming from the sensor
int outval = 86;
boolean pushedfront = false;
boolean pushedrear = false;
int lastval = 86;

void setup() {
 myservo.attach(9);
}

void loop() {
 val = analogRead(potPin); // read the value from the sensor
 val = map(val, 0, 1023, -80, 279);

 outval = val;
 if(val<70&&val>35)
 outval-=4;
 else if(val>120)
 outval+=3;

 if(val>136){
 outval=136;
 }
 else if(val<26){
 outval=26;
 }
 myservo.write(outval);

 if(outval>110 && pushedfront==false){
 myservo.write(140);
 delay(200);
 pushedfront=true;
 }
 else if(outval<70 && pushedrear==false){
 myservo.write(35);
 delay(200);
 pushedrear=true;
 }

 if(outval+lastval>=220){
 pushedrear=false;
 }
 else if(outval==50){
 pushedfront=false;
 }

 lastval=outval;
}

Please note that this toy is not yet finished. So maybe I have to make change of this code some time in the future.

GEET – Gasoline Vapor System

Lawnmower_1Since I got this Lawnmower, I always had one problem: if the engine is warm, it stopped to work and it could not be started anymore. But if the engine cooled down, it started without any problem. I have replaced spark plug, ignition coil and fuel line but I had no luck. This is AS-Motor Lawnmower with Briggs and Stratton engine. I thought before I buy a new carburetor, I will try something else: GEET System (more info: JNLLabs). With GEET Setup this Lawnmower works great.

This is the heart of GEET System:

lm_03 lm_04And here are some pictures taken by my 5-year-old son:

lm_05 lm_06 lm_07