Skip to main content

Arduino code for Gaui 330X quad copter

I've been doing some work with arduino and GAUI 330X. In this example we controlling the throttle speed of the engines. On the 330X throttle is also used to reset and config the ESCs (4 small boards that control the power to the engines and speed).

I removed the blades and replace those with plastic circles, so I can test the code without having the 330x flying all over the place.

Since I don't own a radio/receiver, it took me a while to get the 330X configure and working.

This example, should allow you to configure the ESCs, and start the 330X, and throttle the engine up and down with the potenciometer.

One thing I didn't realize for a while is that the ESCs are the ones that beep (not the GU334), and since all four are connected to the GU3344 is difficult to configure them because they all beep at same time and are not really synchronized, so you can't really figure out what is the current state of each one.

Probably in the future, I need to figure out a easy way to configure the ESC one by one, without redoing all the wiring.

This code should be used with a potenciometer on pin analog 1.

The wires from GU334 gyroscope should connected to the arduino in the order below:
  • yellow is the rudder wire connect to pin 9
  • orange is the throttle wire connect to pin 10
  • red is the int elevator wire connect to pin 11
  • green is the gain/gear don't connect this wire
  • white is the aileron wire connect to pin 12 (this connector also has power (3 wires). Only connect the white wire to the arduino)
GU334 wires behave like servos, so you can use the servo arduino library, to control the GU334.

Just take it consideration that 90(the user is not pushing the controls) is the neutral value on the servo and 0(user pushing the controls backwards at max) is max backwards value and 180(user pushing the controls forward at max) is max forward value.


int aileronPin = 12;
int rudderPin = 9;
int throttlePin = 10;
int elevatorPin = 11;
int gainPin = 8;
int potPin = 1;

Servo aileron; //White
Servo rudder; //Yellow
Servo throttle; //Orange
Servo elevator; //Red
Servo gain; //Green (Gain/Gear)

void arm(){
setSpeed(aileron, 90);
setSpeed(rudder, 90);
setSpeed(throttle, 90);
setSpeed(elevator, 90);
setSpeed(gain, 90);

void setSpeed(Servo &s, int speed){
if ( != speed) {

void setup() {

void loop() {
int foo = analogRead(potPin);

NOTE: Created a library for arduino to control the Gaui 330X available here


Popular posts from this blog

Ubuntu 17.10 running on Lenovo Yoga 920 with HiDPI and touch screen support

I resized the windows partiton to the minimun necessary (100G), disabled secure boot and I also remove bitlocker key encryption on windows drive, this allows Ubuntu to see that partition and allow windows to boot with secure boot disabled, without complaning.

This makes everything go easier if you want to keep windows arround on the same disk and dual boot with Ubuntu, you should do this it helps a lot. Even after you disable this, you can re-enable it back, both secure boot and bitlocker key encryption.

Before installing on windows updates resize your windows partition, installing all windows updates will not alow you to gain as much space as possible. After resizing the windows partition to the minimium size you want, install all windows updates, bios and driver updates.

I upgraded all windows updates to the latest version and all drivers to the latest version and upgraded the bios on windows to the latest version before installing Ubuntu, I don't think this makes much differenc…

Chrome OS advanced commands, settings, expert features

Chrome OS advanced commands, settings, expert features All features described here where tested on a Asus C302 Chromebook, but should work on all Chromebooks, screenshots are from the Asus C302.
Recovery Install new factory image for your chrome book

Perform a Hard Reset Go to settings select the reset section, you can do a reset or a powerwash.

Force-Boot Into Recovery Mode If you’d like to reinstall Chrome OS and you don’t see the “Chrome OS is missing or damaged” message on your screen, you can force your Chromebook to boot into recovery mode.

First, turn off your Chromebook. Next, press Esc + Refresh on the keyboard and hold down the Power button. Your Chromebook will boot straight to recovery mode.

Enable Canary First, turn off your Chromebook. Press Esc+Refresh+Power and, when the recovery prompt appears, press Ctrl+D and accept the prompt that appears to disable boot verification. When the Chromebook reboots, press Ctrl…

Ubuntu GNOME 17.04 running with HiDPI and touch screen support

Ubuntu GNOME 17.04 running with HiDPI and touch screen support

See my previous post on how to install Ubuntu on Yoga Pro 2 for Ubuntu GNOME 16.10.

I think Ubuntu GNOME is the best flavor of Ubuntu if you are running in HiDPI mode 3200x1800. All screen captured images are at HiDPI resolution.
Touch support Ubuntu gnome support for touch screen is pretty good on the desktop shell.
Chrome browser supports touch screen very well and much better than Firefox without any plug-ins.
The windows key on the screen panel works as the windows key on the keyboard.
Screen rotation is supported on the new gnome and disables the keyboard when the yoga is used as a tablet, side lock rotation button works to lock the screen in a certain rotation.

 What works Almost everything works great out of the box, there isn't many changes you need to do.
UbuntuGnome ships with gnome 3.24 and will boot with full resolution HiDPI and touch screen support enabled
Screen HiDPI supportBrightness, resolution keys, o…