Unit B · Things that move, things that show
What we are making: a screen with your own words on it. From today onwards, your machines can tell you things without a laptop attached.
Everything you have built so far has talked to you through the Serial Monitor — which means it only talks when a laptop is plugged into it. A machine with a screen is a machine you can unplug, carry to the front of the room, and hand to somebody.
This screen has sixteen characters across and two lines down. That is not many. Deciding what deserves to be on it is a real design decision, and you will make it in every project from here.
setCursor(5, 0).0x27, but a good number are 0x3F. Change the one number and upload again — it costs ten seconds and it is the answer about half the time.| What you see | Why | What to do |
|---|---|---|
| Backlight on, no text | Contrast is turned right down. | Turn the little blue screw on the back until letters appear. |
| Nothing at all, not even light | No power reaching the module. | Check VCC and GND before suspecting anything cleverer. |
| Blocks of solid squares | The I2C address is wrong. | Change 0x27 to 0x3F and upload again. |
| Text appears then vanishes | It is being redrawn constantly. | You are printing inside loop() with no delay. Move it to setup(). |
In this session