View on GitHub

kapakaigames

MakeCode Arcade-utvidelse som interagerer med eksterne sensorer og aktuatorer via en ESP32. Inkluderer blokker for spillkontroll, sprite-håndtering, lyd og ESP32-kommunikasjon.

Open this page at https://kapakaigamerclub.github.io/kapakaigames/

Use as Extension

This repository can be added as an extension in MakeCode.

Edit this project

To edit this repository in MakeCode.

Metadata (used for search, rendering)

Kapakai Games Arcade MakeCode Extension

This extension allows you to create games in MakeCode Arcade that can interact with external sensors and actuators via an ESP32 and a Middleman micro:bit. The extension is designed to generate commands that are sent to the Middleman micro:bit, which then forwards them to the ESP32. It also receives sensor data from the Middleman micro:bit and makes it available to the game.

Features

The extension provides the following features:

Components

To use this extension, you will need the following components:

Connections

The sensors and actuators should be connected to the ESP32 as described in the pinsEsp32.pdf document.

How to Use the Extension

  1. Add the extension to your MakeCode Arcade project by using the GitHub URL.
  2. Use the blocks in the kapakaigames namespace to:
    • Define which sensor should affect which game property.
    • Control the LED and laser.
    • Open and close the door and window.
    • Receive sensor data from the Middleman micro:bit.
  3. Use the sensor data to affect the game.

Available Blocks

Sensor Effects

Actuator Control

Data Reception

Communication

Data Format

The Middleman micro:bit should send sensor data in the following format:

Lysverdi:<verdi>;PIR:<verdi>;Vanndamp:<verdi>;

Hvor <verdi> er sensorverdien som sendes som et tall for lys og vanndamp, og som boolsk verdi for PIR-sensoren (1 for bevegelse oppdaget, 0 for ingen bevegelse).