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