Qwiic Transparent OLED HUD Hookup Guide

Pages
Contributors: Englandsaurus
Favorited Favorite 11

Library Overview

Note: This example assumes you are using the latest version of the Arduino IDE on your desktop. If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you have not previously installed an Arduino library, please check out our installation guide.

First, you'll need the SparkFun Transparent OLED HUD Arduino library. You can obtain this library through the Arduino Library Manager. Search for Sparkfun Wisechip HUD to install the latest version. If you prefer downloading the libraries from the GitHub repository and manually installing it, you can grab them here:

Before we get started developing a sketch, let's look at all of the functions we can use to control segments on the transparent HUD. The below code initializes the functions for the individual segments in the compass circle (CCx() functions), compass arrows (D0x() functions), tire pressure indication, destination distance(H01(), K01(), M01() for hours, kilometers, and meters), turn distance (K02() and M03() for kilometers and meters), the phone and TPMS icons (P0x() and T0x()) and finally, the 1's on the speedometer and compass (S01_BAR() and S15_BAR()). You won't need to use most of these functions, as most are used in higher level functions like setSpeedometer(), but we've given you access to these segments anyway. Turning any segmetn on is as simple as calling it with an argument of 1. Calling with a 0 will turn it off.

language:c
void D01(uint8_t Action);
void CC1(uint8_t Action);
void D02(uint8_t Action);
void CC2(uint8_t Action);
void D03(uint8_t Action);
void CC3(uint8_t Action);
void D04(uint8_t Action);
void CC4(uint8_t Action);
void D05(uint8_t Action);
void CC5(uint8_t Action);
void D06(uint8_t Action);
void CC6(uint8_t Action);
void D07(uint8_t Action);
void CC7(uint8_t Action);
void D08(uint8_t Action);
void CC8(uint8_t Action);
void D0x(uint8_t Action);
void C01(uint8_t Action);
void C02(uint8_t Action);
void H01(uint8_t Action);
void K01(uint8_t Action);
void M01(uint8_t Action);
void C03(uint8_t Action);
void K02(uint8_t Action);
void M03(uint8_t Action);
void P01(uint8_t Action);
void P02(uint8_t Action);
void P03(uint8_t Action);
void T01(uint8_t Action);
void T02(uint8_t Action);
void S01_BAR(uint8_t Action);
void S15_BAR(uint8_t Action);

Higher Level Functions

The available functions for the transparent OLED can be more easily seen in the below photo.

Segment Map

Segment Map. Click to enlarge.

All of the below functions will set a group of segments based on the argument passed into them

  • void compassCircle(uint8_t Select);
    • 0: All Off
    • 1-8: All Off Except Selected
    • 9: All On
    • 10-17: All On Except Selected
  • void compassArrows(uint8_t Select); --- Same as compass circle.
  • void radarDistanceUnits(uint8_t Action); --- turns on the m for radar distance.
  • void flag(uint8_t Action); --- Turns on the flag segment.
  • void tirePressureAlert(uint8_t Action); --- Displays TPMS text.
  • void speedometerUnits(uint8_t Action); --- Displays KM/H segments.
  • void destinationDistanceUnits(uint8_t iconUnits);
    • 0: Blank
    • 1: h
    • 2: m
    • 3: km
  • void turnDistanceUnits(uint8_t iconUnits);
    • 0: Blank
    • 1: m
    • 2: km

The following functions display the road and tunnel segments, pass in a 1 to turn the segment on.

  • void leftTunnel(uint8_t Action);
  • void middleTunnel(uint8_t Action);
  • void rightTunnel(uint8_t Action);
  • void leftRoad(uint8_t Action);
  • void middleRoad(uint8_t Action);
  • void rightRoad(uint8_t Action);

The following functions turn on the corresponding segments for the navigation

  • void nav_Group(uint8_t Action); --- Triggers the whole nav group
  • void nav_KeepLeft(uint8_t Action);
  • void nav_TurnLeft(uint8_t Action);
  • void nav_TurnRight(uint8_t Action);
  • void nav_HardRight(uint8_t Action);
  • void nav_HardLeft(uint8_t Action);
  • void nav_UTurnLeft(uint8_t Action);
  • void nav_UTurnRight(uint8_t Action);
  • void nav_ContinueStraight(uint8_t Action);
  • void nav_KeepRight(uint8_t Action);

  • void radarDetector(uint8_t Level);

    • 0: No Radar Gun Icon
    • 1: Radar Gun Only
    • 2-8: Distance Meter
  • void setHeading(uint8_t SpeedNo); --- Set's the compass heading. Maximum of 199.
  • void setDestinationDistance(uint16_t SpeedNo, uint8_t Mode); --- Set's the distance in the destination segments. Maximum of 999.
  • void setRadarDistance(uint16_t SpeedNo, uint8_t Mode); --- Set's the distance in the radar segments. Maximum of 999.
  • void setTurnDistance(uint16_t SpeedNo, uint8_t Mode); --- Set's the turn distance. Maximum of 999.
  • void setTirePressure(uint8_t SpeedNo, uint8_t Mode); --- Set the tire pressure. Maximum of 99
  • void setSpeedometer(uint8_t SpeedNo); --- Set the speedometer. Maximum of 199.
  • void setCallIcon(uint8_t iconStatus);

    • 0: Blank
    • 1: Outline
    • 2: Outline + Phone
    • 3: All Segments
  • void clearAll(void); --- Clears all segments.