let’s build a fictitious alarm clock with AI, using the project to highlight the human AI interaction ?
First, we start off with a decent AI that’s not expensive: Deepseeek V4 Pro - the top Deepseek model at this time of writing. It costs about $0.85 USD per million output tokens compared to Claude Fable’s $50.00 for the same number of tokens. I estimate it will cost a couple of dollars for the complete alarm clock design.
Then we will go thru Openrouter to access it from our PC by using Opencode or you can use Opencode itself, see the ‘Zen’ menu at the Opencode URL.
From a new sub-directory in our home directory, called ‘alarm-clock’ open Opencoder in ‘PLAN’ mode and tell the AI what we want.
In Opencode the command ‘/init’ will create a AGENTS.md file to initialize OpenCode for the project, so do that now:
/init
Our Opencode dialog:
Create a plan to build an alarm clock project, lets call it ‘alarm-clock’.
Itemize every step of your plan in detail and include my permission as a hard requirement before finishing one step and moving on to the next step. It is essential that I understand each step before we proceed to the next. If you think I don’t really understand a step, teach me what I need to know and test me on the new knowledge before proceeding. I’m sometimes not paying attention fully, so feel free to print BOLD text to draw my attention when required.
Log our dialog at all steps, (now and for the life of this project) in ‘log.md’ where you’re the ‘AI’ and I’m ‘Terry’.
The alarm clock project will use a SPI connected lcd display of 4 lines with 20 characters each.
A STM32G030 microprocessor will control the display, provide the real time clock and read the user pushbuttons needed for the project, ie set-time-seconds etc.
The programming language will be Mecrisp-Stellaris Forth, see the file ‘mecrisp-stellaris-dictionary.md’ for all the syntax you will need. Don’t use any other Forth syntax either traditional or popular.
Create a file named ‘wiring.md’ that itemizes all the connections I’ll need to provide to connect everything on a breadboard to prototype and test this project. Later I will design a PCB using this design once the prototype has been proven to work and meet all tests.
Create a file named ‘tests.md’ for all the tests you think I should do to prove the design.
Where my instructions are lacking detail or problematic, list them in a file named ‘problems.md’ along with your reasons why.
Now create your plan for me to approve