jantje/arduino-eclipse-plugin — pull request #45 by wimjongman (2013-10-20 16:47:53+00:00)
Title: Contribution to arduino plugin

Hi Jantje,

Please consider accepting these changes:

Changed Serial to accept multiple MessageConsumers
Registered the Serial as an OSGi service
Added the Nebula Oscilloscope jar to lib folder
Added a Scope View
Added a ScopeListener to handle the OscilloScope
Connected the Scope View to the Serial
Added "Open Scope" to the toolbar with icon
Changed the Serial Monitor view icon
Added scope control commands to the serial monitor view
Added the "setscope toggleTailFade" serial command
Added the "setscope delayLoop nnn" serial command

Please see the attached sketch for some serial fun.

Cheers,

Wim

// Do not remove the include below
#include "test_x_x_x.h"

/*
Sine curve
Puts a sine curve into the serial to demonstrate the oscilloscope

This example code is in the public domain.
*/

double value = 3.1415927;
double counter = 0.1;

void setup() {
value = 3.1415927;
counter = 0.1;
boolean init = false;
Serial.begin(115200);
}

// the loop routine runs over and over again forever:
void loop() {
value += counter;
if (value > 2 * PI) {
value = 0;
}
Serial.println((int) (sin(value) * 100));
delay(20);
}