2

I am quite new to the Arduino stuff. I have got the Arduino IDE installed side by side with Eclipse. I am using Eclipse with the Arduino plugin, which is working well for me, including the SerialMonitor.

If you're using Eclipse with the Arduino plugin, it'll also add two new views. One is the serial monitor, the other one is called scope. Scope is a 6 channel Oscilloscope. But I don't know how to get values displayed there.

I am just curious how to use the scope there. I can't find any tutorial for this.

Can somebody explain how to show something inside the scope?

sa_leinad
  • 3,218
  • 2
  • 23
  • 51
nouseforname
  • 131
  • 1
  • 3

4 Answers4

2

The simplot library (referenced below) is an excellent example of how to use the scope which works as advertised. Firstly, readers should note that there are two different Arduino plugins for Eclipse ("Eclipse C++ IDE for Arduino" and "Arduino Eclipse plugin named Sloeber V3"). Only the latter has a scope and a seriel monitor that allows data to be sent. Getting simplot and the scope to work, however, can be a problem depending on the platform. On a Mac, with the latest version of Eclipse (Neon.2 Release Candidate 2) and the Sloeber V3 plugin, the default path to the Private Library is Users/yourname/Arduino/libraries. Unfortunately, this path doesn't (necessarily) exist. One could spend hours trying to figure out how and where to import a library when the critical library folder doesn't exist.

The solution (at least on a Mac):

  • Create a folder (arbitraily) named "Users/yourname/Eclipse/libraries".
  • Include this folder in Eclipse - Preferences - Arduino - Private Library Path
  • Download jantje's entire Github Arduino Library, unpack it and move the "simplot" folder into your Private Library Folder. "simplot" should now show up in the libraries.
  • Use: Arduino - Add a Library to the Selected Project
  • Or build a project using the simplot.ino example.

It should work beautifully.

1

Given that two bytes are short, you send:

  1. SCOPE_START_DATA short flag: 0xCDAB
  2. short number of following bytes to read (for example, 0x0002 for only one channel)
  3. one short per channel

P.S. This is shamelessly stolen from it.baeyens.arduino.monitor.views.ScopeListener

Greenonline
  • 3,152
  • 7
  • 36
  • 48
radzimir
  • 111
  • 1
1

The plugin FAQ links to a defunct website. However the internet wayback machine reveals some good info (https://web.archive.org/web/20150321054307/http://www.negtronics.com/simplot). In particular a link to the arduino forums that has some code samples: http://forum.arduino.cc/index.php?topic=58911.0

0

Try the simplot library.

It is from the author of the plugin and works with both 32 and 8 bit processors. There is an example included that should get you going.

The plotter itself automatically connects to the first serial connection so there is no connect needed for the plotter like there is for the serial connection.

jantje
  • 1,392
  • 1
  • 8
  • 16