SRA Board Components
ESP-IDF component for SRA Board
Macros | Functions
oled.h File Reference
#include <stdio.h>
#include <string.h>
#include <driver/gpio.h>
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include "pin_defs.h"
#include "lsa.h"
Include dependency graph for oled.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SRA_LOGO   1
 
#define WALLE_LOGO   2
 
#define MARIO_LOGO   3
 
#define WALLE_TEXT   CONFIG_WALL_E_LOGO_TEXT
 
#define MARIO_TEXT   CONFIG_MARIO_LOGO_TEXT
 

Functions

esp_err_t init_oled ()
 enables and configures OLED display More...
 
esp_err_t display_logo (int logo_id)
 displays SRA/Wall-E/Mario logo on OLED screen More...
 
esp_err_t display_lsa (line_sensor_array readings)
 displays LSA bar on OLED screen More...
 
esp_err_t display_mpu (float pitch, float roll)
 displays pitch and roll readings on OLED screen More...
 
esp_err_t display_pid_values (float kp, float ki, float kd)
 displays kp, ki and kd reading on the OLED screen More...
 
esp_err_t display_servo_values (int s1, int s2, int s3, int s4)
 displays Servo angles on the OLED screen More...
 

Macro Definition Documentation

◆ MARIO_LOGO

#define MARIO_LOGO   3

◆ MARIO_TEXT

#define MARIO_TEXT   CONFIG_MARIO_LOGO_TEXT

◆ SRA_LOGO

#define SRA_LOGO   1

◆ WALLE_LOGO

#define WALLE_LOGO   2

◆ WALLE_TEXT

#define WALLE_TEXT   CONFIG_WALL_E_LOGO_TEXT

Function Documentation

◆ display_logo()

esp_err_t display_logo ( int  logo_id)

displays SRA/Wall-E/Mario logo on OLED screen

Parameters
logo_idmacro
Returns
esp_err_t i.e it shows if logo is displayed successfully or not

◆ display_lsa()

esp_err_t display_lsa ( line_sensor_array  readings)

displays LSA bar on OLED screen

Parameters
readingsline_sensor_array struct
Returns
esp_err_t i.e it shows if LSA bar is displayed successfully or not

◆ display_mpu()

esp_err_t display_mpu ( float  pitch,
float  roll 
)

displays pitch and roll readings on OLED screen

Parameters
pitchValue of pitch in float
rollValue of Roll in float
Returns
esp_err_t i.e it shows if Pitch and Roll values are displayed successfully or not

◆ display_pid_values()

esp_err_t display_pid_values ( float  kp,
float  ki,
float  kd 
)

displays kp, ki and kd reading on the OLED screen

Parameters
kpvalue of kp in float
kivalue of ki in float
kdvalue of kd in float
Returns
esp_err_t i.e it shows if Pitch and Roll values are displayed successfully or not

◆ display_servo_values()

esp_err_t display_servo_values ( int  s1,
int  s2,
int  s3,
int  s4 
)

displays Servo angles on the OLED screen

Parameters
s1value of Servo_A in float
s2value of Servo_B in float
s3value of Servo_C in float
s4value of Servo_D in float
Returns
esp_err_t i.e it shows if Pitch and Roll values are displayed successfully or not

◆ init_oled()

esp_err_t init_oled ( )

enables and configures OLED display

Parameters
None
Returns
esp_err_t i.e it shows if OLED is initialised successfully or not