Kubix control code based on Arduino Uno