Hello, i have an accelerometer (3 axis but I'm running just x and y because i don't need z for a project I'm doing, and the serial monitor operates regularly but I cannot seem to operate the serial plotter. I need the serial plotter to have a visual for acceleration change when doing impact testing. here is my code
const int groundpin = A1; // analog input pin 4 -- ground
const int powerpin = 19; // analog input pin 5 -- voltage
const int xpin = A4; // x-axis of the accelerometer
const int ypin = A3; // y-axis
const String XHEADER = "X: ";
const String YHEADER = "Y: ";
const String TAB = "\t";
void setup() {
// put your setup code here, to run once: // initialize the serial communications:
Serial.begin(9600);
// Power and ground the necessary pins. Providing power to both
// the analog and digital pins allow me to just use the breakout
// board and not have to use the normal 5V and GND pins
pinMode(groundpin, OUTPUT);
pinMode(powerpin, OUTPUT);
digitalWrite(groundpin, LOW);
digitalWrite(powerpin, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:// print values that are recieved from the sensors and put a tab between
// the values
Serial.print(XHEADER + analogRead(xpin) + TAB);
Serial.print(YHEADER + analogRead(ypin) + TAB);
Serial.println();
delay(500);
}
and the error messages
Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException
at processing.app.helpers.CircularBuffer.min(CircularBuffer.java:42)
at processing.app.SerialPlotter$GraphPanel.computeBounds(SerialPlotter.java:90)
at processing.app.SerialPlotter$GraphPanel.paintComponent(SerialPlotter.java:124)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
THANK YOU FOR YOUR ASSISTANCE Please bear with me, I am a brand new arduino user just trying to configure an accelerometer.