An arduino library to communicate serial in HaLakeKitFirst style.
You can install by using library manager.
[Sketch] -> [Include Library] -> [Manage Libraries..] -> search "halakekitfirst" then install it.
If you want to get some sample, see examples of this project.
#ifdef USBCOM
// For Arduino Leonardo ets.. that its Serial is only for USB communication.
HaLakeKirFirst kitFirst(&Serial1);
#else
// For Arduino UNO etc..
HaLakeKitFirst kitFirst(&Serial);
#endif
void setup() {
kitFirst.begin();
}
int value = analogRead(SOME_PIN);
kitFirst.send(value,
0, // min value to send
1023); // max value to send
int value;
if (kitFirst.receive()) {
value = kitFirst.getReceivedValue(0,
255);
}
analogWrite(SOME_PIN, value);