Mladen Ilic
Published © MIT

Cereal Monitor

Drop-in replacement for Arduino's serial monitor with variable watches.

BeginnerProtip1,193
Cereal Monitor

Things used in this project

Story

Read more

Code

Example Usage

C/C++
#include "Cereal.h"

#define STATUS_PIN 3
#define THROTTLE_PIN A2

void setup() {
  // Set the baud rate for serial data transmission 
  Serial.begin(9600);
  
  pinMode(STATUS_PIN, INPUT);
  pinMode(THROTTLE_PIN, INPUT);
   
  // Serial output shown in [Monitor] window
  Serial.println("Setup done...");
}

void loop() {
  int rnd = random(10, 20);
  int throttle = analogRead(THROTTLE_PIN);
  int status = digitalRead(STATUS_PIN);
  
  // Basic variable type output
  Cereal.variable("Random", rnd);
  
  // Range variable type output
  Cereal.analog("Throttle", throttle);
  
  // Flag variable type output
  Cereal.digital("Status", status);
}

Cereal Monitor Repository

Credits

Mladen Ilic
1 project • 0 followers

Comments