กลับไปหน้ารวมไฟล์
b1ts-to-hex-game-637251-en.md

Final project for Arduino Basics course 2025 in SENAC Ribeirão Preto - Brazil.

The game consists of converting a 4-bit binary number as quickly as possible to its hexadecimal representation (maximum value of F).

The player has 99 seconds of available time to read all 16 numbers of 4-bit binary, convert it to its hexadecimal representation and find the right answer by pressing UP button and answering by pressing OK button.

The binary number is shown both in the LCD and leds.

The best player is the one who answers correctly all the number conversions before the time is up.

The project architecture is based in MVC concepts: Game.h for Model , ShowState.h for View and StateMachine.h for Controller.

EXPANDED TECHNICAL DETAILS

Computer Science Educational Hardware

B1TS to HEX is an interactive puzzle game designed to teach the fundamentals of binary-to-hexadecimal conversion through tactile gameplay.

  • Binary Input Matrix: Features 8 high-quality toggle switches representing a single "Byte" (8 bits). As the user flips the switches, the Arduino calculates the corresponding Hexadecimal value in real-time.
  • Dynamic Challenge Engine: The system generates a target Hex value on a high-contrast I2C OLED screen. The user must match their switch positions to the target within a set time limit, increasing the difficulty as they progress.

Logic Visualization

  • Bitwise Shifting Core: The firmware uses bitwise operations (<< and |) to assemble the 8-bit binary input into a single decimal integer for efficient comparison, providing a foundational lesson in low-level data manipulation.

ข้อมูล Frontmatter ดั้งเดิม

title: "B1TS to HEX game"
description: "Learn and practice number base conversion from bits to hexadecimal with this challenging game based on Arduino UNO and 16x2 LCD."
author: "fabiano-arantes"
category: "Gadgets, Games & Toys"
tags:
  - "Games"
views: 338
likes: 0
price: 1120
difficulty: "Intermediate"
components:
  - "1x 16x2 LCD"
  - "1x arduino uno r3"
  - "4x Yellow LED"
  - "5x Resistor 330 ohm"
  - "2x Resistor 10k"
  - "2x Push Button"
tools: []
apps:
  - "1x Arduino IDE 2.0"
downloadableFiles:
  - "https://github.com/fabiano-arantes/arduino-game-bits-to-hex"
documentationLinks: []
passwordHash: "5cce82d72b6041706505f283bc1fb18ad53092f3c4f903f59153c9d368b3b3fc"
encryptedPayload: "U2FsdGVkX1/8Vfm7iI4egrU6HbfbNcjpnR5wqI6Xb6mO1jRvD+N8TFVRK2pi/PBuciEr445L1V8Qk9YzDdXWee2F3d4LBs97vx2V0h8LKu8="
seoDescription: "Master bits to hexadecimal conversion with this Arduino UNO and 16x2 LCD game. A fun and challenging way to practice binary and hex."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/b1ts-to-hex-game-637251_cover.jpg"
lang: "en"