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

Комментарии • 7

  • @MyTube4Utoo
    @MyTube4Utoo 20 дней назад

    That's just cool.

  • @jamjarg55
    @jamjarg55 2 месяца назад +2

    Hi john. Top job, can you list the Lego parts needed for the bracket please?

  • @_d-code
    @_d-code 3 месяца назад +2

    Could you post the link to the Encoder and also the sensor support?

    • @johnmurray1889
      @johnmurray1889  3 месяца назад +1

      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

  • @earl9378
    @earl9378 18 дней назад

    where do you buy the mouting kit?

    • @johnmurray1889
      @johnmurray1889  18 дней назад +1

      @@earl9378 it’s Lego compatible, so I just used some I had laying around from a dollar tree set