MakerPlot
  • Home
  • Features
  • Free Trial
  • Buy
  • New
  • More
    • Guide
    • Interfaces
    • Videos >
      • Basic Plotting
      • Interfaces
      • Learn
      • Maker
    • Arduino Sketches
    • FAQ
    • Building Tools
    • Custom Interfaces
    • Developers
    • Hot Keys
    • License Information
    • Trademarks
    • Terms and Conditions
    • Common Problems
  • Contact

Arduino Sketch    Building Interfaces from your Micro


// Build from micro
// This sketch is in the public domain

const int analogInPin = A0;   // Analog input pin that the potentiometer is attached to
int sensorValue = 0;         // value read from the pot

void setup() {
  // configure hardware
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
 
Serial.println ("  '   lbl_83 -- OLABEL *****");
Serial.println ("!POBJ oLabel.lbl_83=77.3,26.2,10.,3.,Pot Value,7,0,8,0");
Serial.println ("!POBJ lbl_83.F=Arial,8,0,0");
Serial.println ("'   lbar_84 -- OIMAGE *****");
Serial.println ("!POBJ oImage.lbar_84=87.,27.,10.,4.,dev\bars\bar_hor_red_0.gif,0");
} 

void loop() {
  // read the analog in value
  sensorValue = analogRead(analogInPin);    
 
  // print the analog values formatted for MakerPlot
  Serial.println(sensorValue);  // send analog value

  // display pot value
  Serial.print ("!POBJ lbar_84 = dev\\bars\\bar_hor_red_");
  Serial.print (sensorValue / 102);
  Serial.println (".gif");
  Serial.println ();
 
  // wait 100 milliseconds before the next loop
  delay(100);                    
}

copyright  LearnOnLine, Inc.
MakerPlot is a product of SelmaWare Solutions, LLC
LearnOnLine, Inc. is the exclusive distributor of MakerPlot