Quiz buzzer scoreboard
The quiz master scores teams from a phone: TEAM A and TEAM B buttons add points; the matrix and dashboard show the score.
What you need
- TinkerPie V1 board (or the free online simulator)
- USB-C data cable
- A 2.4 GHz Wi-Fi network and a phone
Wiring
Put your Wi-Fi name and password in the first block. Then open the address shown in the console on a phone on the same Wi-Fi.
Step by step
- Open Quiz buzzer scoreboard in TinkerPie Studio. It opens as blocks.
- Wire it: Put your Wi-Fi name and password in the first block. Then open the address shown in the console on a phone on the same Wi-Fi.
- Press Run to try it in the simulator. Use the sliders and buttons under the board picture to test it.
- Type your Wi-Fi name and password into the connect to Wi-Fi block.
- Connect TinkerPie with a USB-C cable in Chrome or Edge, press Connect, then Download. Or, with Studio started from the TinkerPie launcher on your computer, open the Arduino C++ tab and press Build & Flash.
- Change something: a colour, a number, a sound. Then run it again.
The code
This is the program the blocks make. The same program runs in the simulator and on the board.
JavaScript
var teamA, teamB;
dashboard.onButton('TEAM A', function () {
teamA = (typeof teamA === 'number' ? teamA : 0) + 1;
dashboard.show('Team A', teamA);
music.beep();
});
dashboard.onButton('TEAM B', function () {
teamB = (typeof teamB === 'number' ? teamB : 0) + 1;
dashboard.show('Team B', teamB);
music.beep();
});
dashboard.onButton('RESET', function () {
teamA = 0;
teamB = 0;
dashboard.show('Team A', teamA);
dashboard.show('Team B', teamB);
});
teamA = 0;
teamB = 0;
basic.showIcon(IconNames.Square, Colors.Blue);
wifi.connect('my-wifi', 'my-password');
dashboard.show('Team A', 0);
dashboard.show('Team B', 0);
basic.showIcon(IconNames.Yes, Colors.Green);Arduino C++ (TinkerPie library)
// Quiz buzzer scoreboard
// Arduino C++ made by TinkerPie Studio from the blocks. Board: TinkerPie V1 (ESP32-S3).
// Arduino IDE: install the TinkerPie library (Studio menu > Arduino library), then Tools > Board > ESP32S3 Dev Module,
// USB CDC On Boot: Enabled, Flash Size: 16MB, Partition Scheme: 16M Flash (3MB APP/9.9MB FATFS), PSRAM: OPI PSRAM.
#include <TinkerPie.h>
using namespace tinkerpie;
double teamA = 0;
double teamB = 0;
void setup() {
tinkerpie::begin();
dashboard::onButton("TEAM A", []() {
teamA += 1;
dashboard::show("Team A", teamA);
music::beep();
});
dashboard::onButton("TEAM B", []() {
teamB += 1;
dashboard::show("Team B", teamB);
music::beep();
});
dashboard::onButton("RESET", []() {
teamA = 0;
teamB = 0;
dashboard::show("Team A", teamA);
dashboard::show("Team B", teamB);
});
teamA = 0;
teamB = 0;
basic::showIcon(IconNames::Square, Colors::Blue);
wifi::connect("my-wifi", "my-password");
dashboard::show("Team A", 0);
dashboard::show("Team B", 0);
basic::showIcon(IconNames::Yes, Colors::Green);
}
void loop() {
tinkerpie::loop(); // runs the forever blocks and handles events
}More projects like this
Phone weather stationTemperature, humidity and light from the board, live on your phone.IoTPhone-controlled robotButtons on your phone drive a two-wheel robot. The slider sets the speed.IoTDoorbell notifierPress A: a bell rings and your phone gets a notification, even from another room.IoTCloud thermometer (ThingSpeak)Logs temperature and light to a ThingSpeak channel every 20 seconds: graphs you can open anywhere.IoTSmart plant monitorSoil moisture on your phone dashboard, a notification when the plant is thirsty, and a ThingSpeak log.IoTPhone light switchON and OFF buttons on your phone switch a lamp through a relay. The dashboard shows if the lamp is on.IoT