Arduino beginner project - Joystick Module with LCD

preview_player
Показать описание
Hello, in today's video i will show you how to connect a joystick (potentiometer) to an LCD, as well as control LEDs with the joystick.

The video gives the parts needed, theory, and wiring.
Thank you for watching. If you have any problems, ask in the comment section. The arduino forums is also a great place for information.

(Re-upload after corrections);

Comments for code--

code -

Library links -

LCD library -

How to install libraries -

Amazon links(U.K) -

LCD -

Joystick module bundle -

My Keyestudio sensor kit, which comes with the HC-SR04 (I got mine on sale) -

Рекомендации по теме
Комментарии
Автор

please tell me the communication module of joy stick is it spi or i2c

VikramjeetPawar
Автор

If you want to use just the regular LiquidCrystal.h library, heres the code i did for it using another tutorial's pinmap.
#include <LiquidCrystal.h>

int Contrast=75;
const int ypin = A1;
const int xpin = A0;
int ystate;
int xstate;
LiquidCrystal lcd(12, 10, 5, 4, 3, 2);

void setup()
{
analogWrite(6, Contrast);
lcd.begin(16, 2);
pinMode(ypin, INPUT);
pinMode(xpin, INPUT);
}
void loop()
{
ystate = analogRead(ypin);

xstate = analogRead(xpin);

lcd.setCursor(0, 0);
lcd.print("X-axis: ");
lcd.print(xstate);
lcd.setCursor(0, 1);
lcd.print("Y-axis: ");
lcd.print(ystate);

}

draconicstudios
Автор

doesn't work for SW. Can you help me please?

jimenezjuanandres
join shbcf.ru