Download and Install iovisualizer Library for Arduino Uno

iovisualizer library provides you some extra functionalities to communicate with iovisualizer Software. There are diffirent methods that you can use. In this example, i used probe() function. It calls all of the pin(A/D) values and convert them to the string which iovisualizer can understand. I will add new functions over time. So, you may want to check Arduino Library section occasionally. I will also announce when i add new functions and modes. Download current version of the iovisualizer library from GitHub.



If you not familier with arduino libraries or you don't know how to install them, Arduino's official documentation page is the best place to learn.

Your First Arduino Code

After installing iovisualizer library properly, you can use it's functions. probe() function gets pin datas and send them to the iovisualizer. You can use probe() like serialPrint(), actually it is serialPrint but it contains all of the pinValues unlike serialPrint. And it doesn't require varible.

Arduino Code (example.ino)
  #include <iovisualizer.h>
  
iovisualizer iov;
void setup() { Serial.begin(200000); }
void loop() { digitalWrite(5,HIGH); iov.probe();
digitalWrite(5,LOW); iov.probe(); }

probe() doesn't have delay on it. In this example led13 change too fast to see. If you upload it to your arduino you can't see the led blink. But in iovisualizer you can see every changes. You can add some delay() if your projects require so but you don't have to add delays for better observation of your codes anymore.

iovisualizer has very simple interface. There are few buttons to click and of course there are some key binding options. You can use keyboard commands to acces almost every functionality in iovisualizer.

Key Bindings


ALT+Mouse1 Drag Rotate

ALT+Mouse2 Zoom

ALT+Mouse3 Pan

E Connect

Q Opens Data Window

A Add Data Sets

C Clear Data Sets

CTRL+S Save Data Sets

Y Small Window Layout

TAB Mode Select

R ScreenShot

P High Quality ScreenShot

W Components Show/Hide

W Components Passive

ESC Mode Select

1 Color Theme 1

2 Color Theme 2

3 Color Theme 3

4 Color Theme 4

T Change Theme


Buttons


Pin Graphs Activate Button. It appears when the pin graphs are active.

Pin Graphs Passive Button. It appears when the pin graphs are passive.

Color Option 1. Defult color theme. Green Project Surface, dark grey board.

Color Option 2. Second color theme. Green Project Surface, light grey board.

Color Option 3. Third color theme. Blue Project Surface, dark grey board.

Color Option 4. Forth color theme. Blue Project Surface, light grey board.

Component Active Button. It appiers when the components are active.

Component Passive Button. It appiers when the components are passive.

Screen Shot Button. Screenshots are saved on the iovisualizer folder. MAC version - In Finder, right click on an app > Show Package Contents


Console


Console input Mode Not yet ready

Console consist of three diffirent sections. First section shows messages, warnings, errors, or debug output from your codes. You can also use this section for define pins,send serial data, read specific data, set frequency etc. See all console commands here. Second console section shows serial outputs. Third section is a button that opens the data window.




iovisualizer has built-in components. Every mode has diffirent component types. Every component is created with certain default attributes. You can also add your own attributes with pressing on them. Here is the complete list of components as per modes.

Classic Mode


Classic Mode Components (Default)


Input components not yet ready

Components A/D I/O Unit Attributes
LEDS Digital Output 8 Digital Pin Number, Color
SERVOS Digital Output (PWM) 4 PWM,RPM,Control Horn Model
DC MOTORS Digital Output (PWM) 2 PWM,RPM,Control Horn Model
STEP MOTORS Digital Output (PWM) 4 PWM,RPM,Control Horn Model
POTENTIOMETER Analog Input 1 None
SWITCHES Digital Input 8 None
BUTTONS Digital Input 4 Toggle Modes
JOYSTICK Analog Input (x,y,z) 1 None
IR SENSOR Analog Input 1 Max, Distance
PIN VISUALIZERS A/D I/O 106 None

Accelerometer Mode Components


Components A/D I/O Unit Attributes
Custom Values Analog Output 3 x, y, z
Analog Pin Values Analog Output 3 x, y, z
acc() function values Analog Output 3 x, y, z

Functions


probe ( );

Arduino Code (blink.ino)
#include <iovisualizer.h>
iovisualizer iov;

void setup() {
  Serial.begin(9600);
  pinMode(5,OUTPUT);
}

void loop() {
  digitalWrite(5,HIGH);
  iov.probe();
  delay(100);
  digitalWrite(5,LOW);
  iov.probe();
  delay(100);
}

acc ( float x, float y, float z );

Arduino Code (acc.ino)
void loop()
{
  int accelCount[3]; // Stores the 12-bit signed value
  readAccelData(accelCount); // Read the x/y/z adc values

  // Now we'll calculate the accleration value into actual g's
  float accelG[3]; // Stores the real accel value in g's
  for (int i = 0 ; i < 3 ; i++)
  {
    accelG[i] = (float) accelCount[i] / ((1<<12)/(2*GSCALE)); // get actual g value, this depends on scale being set
  }

iov.acc(accelG[0],accelG[1],accelG[2]);
iov.probe();
iov.servo4(100,200,300,100);
iov.dc2(200,200);
//  delay(10); // Delay here for visibility (You don't need to use anymore :)

}

servo1 ( int position1 );

servo2 ( int position1, int position2 );

servo3 ( int position1, int position2, int position3 );

servo4 ( int position1, int position2, int position3, int position4 );

Arduino Code (servo.ino)
#include <Servo.h> 
#include <iovisualizer.h>
    iovisualizer iov;
    
Servo myservo;  // create servo object to control a servo 
                // iovisualizer has 4 servo for now
int pos = 0;    // variable to store the servo position 
 
void setup() 
{ 
  Serial.begin(200000); // Very fast connection.
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
} 
 
void loop() 
{ 
  for(pos = 0; pos <= 180; pos += 1) // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo.write(pos);  // tell servo to go to position in variable 'pos'
    iov.servo1(pos); //Send servo position to the iovisualizer.
    iov.probe(); // You can use probe() to visualize other pin values.                        
  } 
  for(pos = 180; pos>=0; pos-=1)  // goes from 180 degrees to 0 degrees 
  {                                
    myservo.write(pos); // tell servo to go to position in variable 'pos'
    iov.servo2(pos,pos); // (2 Servo) Send servo positions to the iovisualizer.
    iov.probe();  // You can use probe() to visualize other pin values.                     
  } 
}

dc1 ( int speed1 );

dc2 ( int speed1, int speed2 );

Arduino Code (dc.ino)
#include <iovisualizer.h>
iovisualizer iov;

//dc1(),dc2() dont't requere pin declaration for iovisualizer.

void setup() {
  Serial.begin(9600);
  pinMode(5,OUTPUT);
}
// After 500ms delay Motor1 and Motor2 speeds change. 
void loop() {
  digitalWrite(5,HIGH);
  iov.dc2(200,100);
  iov.probe(); //For visualizing the noise
  delay(500);
  digitalWrite(5,LOW);
  iov.dc2(100,200); //Motor1 speed 100, Motor2 Speed 200
  iov.probe(); //For visualizing the noise
  delay(500);
}

lcd ( char* line1, char* line2 );

Arduino Code (lcd.ino)
#include <iovisualizer.h>
iovisualizer iov;

void setup() {
  Serial.begin(9600);
  pinMode(5,OUTPUT);
}

void loop() {
  digitalWrite(5,HIGH);
  iov.dc1(200);
  iov.lcd("LED HIGH","DC SPEED 200");
  iov.probe(); //For visualizing the noise
  delay(500);
  digitalWrite(5,LOW);
  iov.dc1(10); //Motor1 speed 100, Motor2 Speed 200
  iov.lcd("LED LOW","DC SPEED 10");
  iov.probe(); //For visualizing the noise
  delay(500);
}

void probe ( );

void acc ( float x, float y, float z );

void dc ( int motorPin1, int motorPin2, int speed, int rotation );

void dc1 ( int speed1 );

void dc2 ( int speed1, int speed2 );

void servo1 ( int pos );

void servo2 ( int pos1, int pos2 );

void servo3 ( int pos1, int pos2, int pos3 );

void servo4 ( int pos1, int pos2, int pos3, int pos4 );

void lcd ( char* line1, char* line2 );