[SOLVED] D1 direction, [SOLVED] Arduino does not recognize midiboy


I received my midiboy kit today and assembled it. I noticed that the diode D1 on my circuit board is recorded the other way round than the one indicated in the manual:

What is right?

I also have the problem that after the successful installation of https://blokas.io/midiboy/package_blokas_labs_index.json in the Arduino IDE, I can’t program the midiboy - it simply doesn’t find an interface (Linux (Kubuntu 19.04) as well as under Windows-10).

Even holding down the B key doesn’t help, although a device is recognized under Linux:
Bus 001 Device 008: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb Linux and Windows do not recognize any serial/COM-port, so I cnnnot choose one…

I can also see The Blokas logo on the OLED display… what’s going wrong here?

And: I cannot compile any software. I tried midimon and I am getting the following error:

In file included from sketch/midimon.ino.cpp:1:0:
    /usr/local/arduino-1.8.9/hardware/arduino/avr/cores/arduino/Arduino.h:257:26: fatal error: pins_arduino.h: No such file or directory
    compilation terminated.
    exit status 1
    Error compiling for board Midiboy.

Regards, Holger

1 Like

Hey, the D1 direction shown in the documentation is incorrect, we’ll fix that, thank you for noticing :slight_smile: - the orientation as printed on the board itself is correct.

As for programming it - it seems to detect the right USB ID on Linux (the ID comes from V-USB library).

On Windows, some users have to install a ‘libusb-k’ driver instead of ‘winusb’ by using Zadig tool - there you have to select USBasp device (in my case, I have to enable ‘List All Devices’ in options), select ‘libusbK’, and click ‘replace driver’:

I found that after I had upgrade Arduino IDE on Windows, I no longer needed to use the Zadig tool to replace the driver that’s used, but one beta tester still had to do it, even with the same version of the Arduino IDE.

Is the ‘Blokas’ boards installed correctly? Make sure that Midiboy is the chosen board in Tools → Board.

My main system for programming is Linux, so I tried to get the right udev-rules. The following seems to create a /dev/ttyUSB* device:

SUBSYSTEM!="usb", GOTO="usb_rules_end"
ACTION!="add", GOTO="usb_rules_end"
ENV{DEVTYPE}!="usb_device", GOTO="usb_rules_end"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE="0666", SYMLINK+="USBasp"
ATTR{idVendor}=="16c0", ATTR{idProduct}=="05dc", MODE="0660", GROUP="plugdev", SYMLINK+="ttyUSB%n"

This has to be installed in /etc/udev/rules.d/49-midiboy.rules and after that you have to restart udev with systemctl restart udev. Now I can get information about midiboy via avrdude from shell:

$ avrdude -P USB -c usbasp -p m644p -v

avrdude: Version 6.3
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/wirtz/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : USB
         Using Programmer              : usbasp
         AVR Part                      : ATmega644P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10   128    0 no       2048    8      0  9000  9000 0xff 0xff
           flash         33     6   256    0 yes     65536  256    256  4500  4500 0xff 0xff
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: Expected signature for ATmega644P is 1E 96 0A
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

BUT: Arduino-IDE is not recognizing the port, so I cannot get any board information. How has the port to be called? ttyUSB* or ttyACM* or something complete new?

That’s a strange thing (Windows and Linux): I followed your instructions (made this yesterday). When selecting INSTALL from the boards manager it takes only some milliseconds and the IDE is telling that everything is installed. I can select the board but compiling fails.

So I tried today again: First I removed the package from the board manager. After that I treid to install again and now there were some files for downloading. It took about 30 seconds, so I thought NOW everthing works fine. But after slecting the midiboy board the same error occured. I removed again and the next installation was also much too fast again - no download anymore :frowning:

Regards, Holger

After installing the Blokas package, the pins_arduino.h should be located in:


An alternative way to install Blokas boards is to clone https://github.com/BlokasLabs/Blokas-Boards into your your arduino/hardware folder - you can find the location by going to Arduino IDE preferences, check the ‘Sketchbook location’ path, in my case I have it set to W:\arduino, so Blokas-Boards should be cloned into W:\arduino\hardware\Blokas-Boards. Then restarting the IDE may be necessary for it to pick up the new files. In that case, the path to pins_arduino.h would be: W:\arduino\hardware\Blokas-Boards\avr\variants\Midiboy\pins_arduino.h

Btw, use -m328p for avrdude :slight_smile:

I will look into using Midiboy with Arduino on Linux tomorrow :slight_smile: Thank you for sharing the udev rules.

Same problem when installing inside ~/Arduino/hardware firect from github :frowning:

Of course :wink:

Ok, thanks!

Regards, Holger

Hey, I found out the issue - the board definition file had ‘midiboy’ set as the variant name while it should have been Midiboy, as the file system is case sensitive. I have just pushed 1.0.4 Blokas Boards package, you should be able to update via Arduino IDE’s Boards Manager.

And for flashing Midiboy on Linux, this udev rule file worked for me, based on this guide, please try putting it to /etc/udev/rules.d/99-Midiboy.rules:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE="0666"

This gives permission for regular users to access the USB device, otherwise I had to run as root to be able to flash Midiboy.

Let us know if things start working for you, we’ll update the documentation with the udev setup. :slight_smile:

Hi @Giedrius,

thanks for the fast response. Had to work today (the thing for getting the fridge full of beer :wink:).

After manually removing all my tests from yesterday I installed 1.04 and now compiling works - thanks!

… no: still not recognizing the device (holding down “B” at start).

This is what dmesg says:
28.880038] usb 1-6: new low-speed USB device number 7 using xhci_hcd
[ 29.032272] usb 1-6: New USB device found, idVendor=16c0, idProduct=05dc
[ 29.032273] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 29.032274] usb 1-6: Product: USBasp
[ 29.032275] usb 1-6: Manufacturer: www.fischl.de
[ 32.199805] usb 1-6: USB disconnect, device number 7
[ 32.832048] usb 1-6: new low-speed USB device number 8 using xhci_hcd
[ 32.984279] usb 1-6: New USB device found, idVendor=16c0, idProduct=05dc
[ 32.984280] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 32.984281] usb 1-6: Product: USBasp
[ 32.984282] usb 1-6: Manufacturer: www.fischl.de

So i looked into /dev/bus/usb/001 and there was a new file named 008:
crw-rw-rw- 1 root plugdev 189, 7 Jul 15 18:10 /dev/bus/usb/001/008

But Arduino does not recognize any device (have changed board to “Midiboy” and programmer to “USBasp”):

As you can see: The port entry is greyed out :cry:

Any ideas? Have I told that I am using
$ cat /etc/lsb-release

Regards, Holger

Ok - my fault! It works WITH a “greyed out” programmer, because the port entry is only used when using a serial programmer. USBasp seems to be something different. :smile:

So: Yeah - Midiboy is running and will help me to find problems with my created synths (see MicroDexed and MicroMDAEPiano).