Philip Ushijima
Published © LGPL

Easiest Way to Add A Full Color LCD Display

An Arduino library that abstracts away all the complexity of a CRC based serial communication protocol into a single variable assignment.

BeginnerProtip1 hour27,362
Easiest Way to Add A Full Color LCD Display

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Amulet Resistive Module
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
GEMstudio Pro
Free trial version never expires.

Story

Read more

Schematics

Fritzing Diagram

Code

Communicating POT Value to Amulet Display

Arduino
Easiest way to add an LCD display to your Arduino projects
/* Arduino sketch to read POT value on analog pin 0 and assigning the value to AmuletWords[0].
*  To make Amulet request the proper variable, place this command in a view widget's (bargraph, numericField, etc) Href in GEmstudio:
*  Amulet:uart1.word(0).value()
*/


#include <AmuletLCD.h>

#define VDP_SIZE 32
//Virtual Dual Port memory used for communicating with Amulet Display 
uint16_t AmuletWords[VDP_SIZE]  = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};

AmuletLCD myModule;

void setup() {
  //start communication with Amulet Display at default baud
  myModule.begin(115200);
  //register our local buffer with Amulet state machine
  myModule.setWordPointer(AmuletWords,VDP_SIZE);
}

void loop() {
  //store analog data in local buffer and wait for Amulet to poll that buffer.
  AmuletWords[0] = analogRead(0);
  delay(100);
}

//This method automatically gets called if there is any serial data available

void serialEvent() {
    myModule.serialEvent(); 
}

Credits

Philip Ushijima

Philip Ushijima

4 projects • 11 followers
Thanks to Brian D..

Comments