Disk space on C: (Windows)

This is draft list of techniques to free space on your system hard drive. Article is written for Windows 7, but it might help you with other versions of Windows. Moving Installer system folder to another harddrive Installer directory (c:\Windows\Installer) is usually one of the most consuming system folders (in my case: it occupies ~6GB).…

JUCE:Projucer hex color paste patch

JUCE is C++ framework for multi-platform VSTi and audio application development (https://juce.com/). It comes with JUCE Projucer IDE that helps a lot with GUI part of plugin development workflow. It is great tool, but color selector GUI component annoyingly lacked ability to accept pasted hex color code. Therefore, I’ve patched color selector GUI component with “paste”…

Sending struct via SPI between Arduino Nano and Arduino Mega 2560

In this experiment, Arduino Nano is SPI Master, sending structured data (struct customMessage) via SPI link to Arduino Mega 2560, which is SPI Slave. The struct is wrapped into union allowing byte level access, used both to read and to write data used in SPI transfer. typedef struct customMessage { unsigned int parameterA; unsigned int…

Controlling 8 digital potentiometers using shift register to save pins

digPotCluster class is part of imbAVR.SynthControl library, in imbAVR.ArduinoSynth GitHub repository. It controls 8 digpots (MPC410-10) using shift register (74CH595N). Purpose of shift register is to reduce number of pins used for CS (chip selection): Normally, you would use 2 (SCLK, MOSI) + 8 (CS for each MPC410-10) = 10 pins Like this, you use…

Doing SPI.Write from class constructor will brick Arduino Pro Micro

I had a small class to manage digpots (MPC410-10), and it all worked well. Until I’ve introduced write call in class constructor (now commented out). void DigPotUnitClass::Write(byte value) { digitalWrite(ChipSelectPin, LOW); SPI.transfer(B00010001); // This tells the chip to set the pot SPI.transfer(value); // This tells it the pot position digitalWrite(ChipSelectPin, HIGH); } DigPotUnitClass::DigPotUnitClass(byte chipSelectPin) { ChipSelectPin…