45 lines
755 B
C
Raw Normal View History

2021-01-29 12:31:58 +01:00
#pragma once
//
// FILE: Optoma.h
// AUTHOR: Rob Tillaart
2023-11-14 16:59:15 +01:00
// VERSION: 0.1.5
2021-01-29 12:31:58 +01:00
// DATE: 2017-11-27
2021-12-22 13:38:25 +01:00
// PUPROSE: Arduino library to control Optoma W305ST beamer over RS232.
2021-01-29 12:31:58 +01:00
// URL: https://github.com/RobTillaart/Optoma
2021-12-22 13:38:25 +01:00
2021-01-29 12:31:58 +01:00
#include "Arduino.h"
2023-11-14 16:59:15 +01:00
#define OPTOMA_LIB_VERSION (F("0.1.5"))
2021-12-22 13:38:25 +01:00
2021-01-29 12:31:58 +01:00
class Optoma
{
public:
Optoma(HardwareSerial* stream = &Serial);
void init(int ID, uint32_t baudRate = 9600);
2022-11-18 15:37:45 +01:00
uint32_t getBaudrate();
2021-01-29 12:31:58 +01:00
void switchOn();
void switchOff();
bool isOn();
2022-11-18 15:37:45 +01:00
// VKS = Vertical KeyStone
2021-12-22 13:38:25 +01:00
void increaseVKS();
2021-01-29 12:31:58 +01:00
void decreaseVKS();
private:
HardwareSerial* _stream;
2021-12-22 13:38:25 +01:00
2021-01-29 12:31:58 +01:00
int _ID = 0;
bool _on = false;
uint32_t _baudrate = 9600;
void sendID();
};
2021-12-22 13:38:25 +01:00
2022-11-18 15:37:45 +01:00
// -- END OF FILE --
2021-12-22 13:38:25 +01:00