joystick 001 — ESP32 simulation

An interactive ESP32 circuit simulation you can run free in your browser on Velxio, by josephkinuthia541.

Components

Sketch code

const int VERT = 35;
const int HOR  = 34;
const int SEL  = 27;

void setup() {

  Serial.begin(115200);

  pinMode(SEL, INPUT_PULLUP);
}

void loop() {

  int vertical = analogRead(VERT);
  int horizontal = analogRead(HOR);
  int selectButton = digitalRead(SEL);

  Serial.print("VERT = ");
  Serial.print(vertical);

  Serial.print("   HOR = ");
  Serial.print(horizontal);

  Serial.print("   SEL = ");
  Serial.println(selectButton);

  delay(200);
}

More projects by josephkinuthia541