Skip to content

J-Hayward99/cpp-arduino-movable-shape-lcd-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino: Movable Shape LCD Test

Example Video

Excuse the wire management, not exactly Ben Eater's wiring

https://www.youtube.com/watch?v=ltrEcaeusLk

Content

1 Purpose

This project was made due to me having some sensors spare and I wanted to exercise my coding skills with an Arduino again.

2 Plan

  • Have a shape on the LCD
  • Able to control the shape with a joystick
  • Able to size the shape with a potentiometer
  • Able to alter the shape with a button

3 Getting Started

3.1 Prequisites

  • 1 Arduino Nano
  • 1 Standard Arduino Joystick Module
  • 1 Potentiometer
  • 1 AZDelivery 1.8 inch SPI TFT ST7735 LCD
  • 2 Buttons
  • 2 10k Resistors
  • N Jumper Cables

3.2 Set-up

3.2.1 Nano to Breadboard

  • Nano plugged into board
  • GND to GND rail
  • 5V to VCC rail

3.2.2 Buttons

  • HIGH to VCC rail
  • LOW to 10k resistor, which is to the GND rail
  • "Colour Change" pin to D2
  • " Fill" pin to D3

3.2.3 Joystick

  • VCC to VCC rail
  • GND to GND rail
  • "X" pin to A1
  • "Y" pin to A2
  • "Switch" pin to D7

3.2.4 LCD Display

  • VCC to VCC rail
  • GND to GND rail
  • "LED" pin to 3V3
  • "SCK" pin to D13 (Nano's SCK pin)
  • "SDA" pin to D11 (Nano's MOSI pin)
  • "A0" pin to D10
  • "RESET" pin to D9
  • "CS" pin to D8

3.2.5 Potentiometer

  • VCC to VCC rail
  • GND to GND rail
  • "Feedback" pin to A7

4 Built With

This code was built in VS Code with the PlatformIO extension

5 Notes

  • The supply voltage is 5.0V while the LED voltage is 3.3V
  • The flickering effect is caused by processor speed limitations, since the processor cannot run fast enough to "hide" the elements being drawn one at a time, an improvement would be to make a second buffer however I do not own the hardware for that improvement.

6 Authors

James Hayward - Sole Author

About

I wanted to mess about with some spare sensors I had

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages