Cardputer using the encoder unit from M5
HTML-код
- Опубликовано: 9 апр 2024
- I got the example code working for the encoder about a week ago, so when I saw the nonfrendo firmware show up on Reddit, I knew I had to modify the encoder to play some Arkanoid.
#m5 #cardputer #arcade #mods
That's just cool.
Hi john. Top job, can you list the Lego parts needed for the bracket please?
Could you post the link to the Encoder and also the sensor support?
shop.m5stack.com/products/encoder-unit
That's the encoder I used. I modified an an existing header file example that interfaces with the encoder. Then imported that header into the controller.cpp file and added some logic in the cardputer section of controls something like this.
#include "Unit_Encoder.h"
Unit_Encoder sensor;
...
extern "C" uint32_t controller_read_input()
{
uint32_t value = 0xFFFFFFFF;
M5Cardputer.update();
sensor.begin();
signed short int encoder_value = sensor.getEncoderValue();
if (last_value != encoder_value) {
if (last_value > encoder_value) {
sensor.setLEDColor(1, 0x000011);
value ^= (1
where do you buy the mouting kit?
@@earl9378 it’s Lego compatible, so I just used some I had laying around from a dollar tree set