# Planning your clock

In this step, we're going to get a vision of what you want to make: what features you want to add, what parts you want to use, and how you want your clock to look.

Make it a weird shape, add a cool feature, or just make it really polished! The point is that you should know what you want to make ahead of time, you can always adjust this along the way.

Start by writing down what you want your clock to do, display the time, use a code to turn off in the morning, play custom tunes, whatever! Once you have an idea of what features you want, lay out the parts you'll use to make it happen. Here are the parts that will be included with your kit:
- Seeed XIAO ESP32C3
- 2.25in TFT display
- 12 Keyboard Switches and Keycaps, with diodes if you need a matrix
- A 3.3V Buzzer for your alarm
- Some wiring so your screen can be off the PCB
- Some screws and heatset inserts for assembly

Check [here](/docs/blare/getting-started) for a more complete list.

You can always add some parts that aren't included in the kit, such as an actual speaker, light, touchscreen, whatever!

## Budgeting GPIOs

This can be a very tricky part, so I encourage you to not get too hung up here, and if you get confused, just move on to the PCB! You'll figure it out as you go.

Your ESP32 has 11 GPIO pins, that means you have 11 pins to use for input and output on your clock:

- 1 for the buzzer
- 4 for your screen (more info below)
- Rest for your keyswitches

After your buzzer and screen, you have 6 pins left for your keyswitches. This translates to 6 keys wired straight, or 9 keys in a matrix. (Your kit includes 12 keys, this is because the microcontroller I was using before had 12 GPIO pins, but that ran out of stock so here we are :sob:. You can still technically get 12 keys working, even with the screen and buzzer, but I'm not gonna explain those techniques here, because they're somewhat advanced. If you really want more than 9 keys, do the research yourself!)

Your screen is one place where you can make some optimizations, here's a rundown of the pins:

- GND - Ground
- VCC - Supply voltage, connect to 3.3V (Not VBUS, that's 5V)
- SCL - Serial Clock, SPI clock line, used to synchronize data transfer. Labelled SCLK or SCK on most devices. Connect to a GPIO.
- SDA - Serial Data, data going from your MCU to the display, labelled MOSI on most devices. Connect to a GPIO.
- RST - Reset pin, pull to LOW to reset the display, to save a pin, just connect to 3.3V.
- DC - Data/Command, tells the display if the incoming byte is a command or pixel data. Connect to a GPIO.
- CS - Chip Select, enables the display on the SPI bus, and also necessary for some bootup stuff. Connect to a GPIO.
- BL - Backlight, powers the LED backlight, this pin is active low (don't ask me why) so connecting it to GND means the backlight is powered. Connect to GND.