SRA Board Components
ESP-IDF component for SRA Board
oled.h
Go to the documentation of this file.
1/*
2 * MIT License
3 *
4 * Copyright (c) 2021 Society of Robotics and Automation
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25#ifndef OLED_H
26#define OLED_H
27
28#include <stdio.h>
29#include <string.h>
30
31#include <driver/gpio.h>
32#include <esp_log.h>
33#include <freertos/FreeRTOS.h>
34#include <freertos/task.h>
35#include "pin_defs.h"
36#include "lsa.h"
37
38#ifdef CONFIG_ENABLE_OLED
39#include "lvgl.h"
40#include "lvgl_helpers.h"
41#endif
42
43#define SRA_LOGO 1
44#define WALLE_LOGO 2
45#define MARIO_LOGO 3
46#define WALLE_TEXT CONFIG_WALL_E_LOGO_TEXT
47#define MARIO_TEXT CONFIG_MARIO_LOGO_TEXT
48
56esp_err_t init_oled();
57
65esp_err_t display_logo(int logo_id);
66
74esp_err_t display_lsa(line_sensor_array readings);
75
84esp_err_t display_mpu(float pitch, float roll);
85
95esp_err_t display_pid_values(float kp, float ki, float kd);
96
107esp_err_t display_servo_values(int s1, int s2, int s3, int s4);
108
109#endif
esp_err_t display_mpu(float pitch, float roll)
displays pitch and roll readings on OLED screen
Definition: oled.c:392
esp_err_t display_servo_values(int s1, int s2, int s3, int s4)
displays Servo angles on the OLED screen
Definition: oled.c:474
esp_err_t display_logo(int logo_id)
displays SRA/Wall-E/Mario logo on OLED screen
Definition: oled.c:285
esp_err_t display_lsa(line_sensor_array readings)
displays LSA bar on OLED screen
Definition: oled.c:335
esp_err_t display_pid_values(float kp, float ki, float kd)
displays kp, ki and kd reading on the OLED screen
Definition: oled.c:435
esp_err_t init_oled()
enables and configures OLED display
Definition: oled.c:247
Definition: lsa.h:35