File:RAMPS1.4 TestCode.pde

From RepRap
Revision as of 18:16, 5 February 2014 by Iamepic (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
RAMPS1.4_TestCode.pde(file size: 3 KB, MIME type: text/x-c++)
Warning: This file type may contain malicious code. By executing it, your system may be compromised.

Arduino test code: It switches on and off all the MOSFET outputs (this will make the leds blink) just be careful not to have the heated bed and extruder heater connected unless you want to heat them. Plus it will move back and forth all the stepper motors connected. Code was contributed by Bart Meijer from RepRapWorld.


Issue: I had an issue using this code, when I tried to open it in the Arduino IDE 0023 I got the following error:


Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 at processing.app.Sketch.setCurrentCode(Sketch.java:1106) at processing.app.Sketch.load(Sketch.java:218) at processing.app.Sketch.<init>(Sketch.java:140) at processing.app.Editor.handleOpenInternal(Editor.java:2114) at processing.app.Editor.<init>(Editor.java:308) at processing.app.Base.handleOpen(Base.java:699) at processing.app.Base.handleOpen(Base.java:664) at processing.app.Base.handleOpenPrompt(Base.java:653) at processing.app.Editor$5.actionPerformed(Editor.java:500) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


The fix was to open it with Sublime2 (or probably any other text editor) and copy paste it into a new file, that I named TestRamps.pde It worked fine then, with no change of the code. Possible causes are the name of the file (some other arduino users experienced similar errors due to naming issues) or maybe copy pasting it fixed some unrecognised character.



The fix is to just rename it. The error is caused by the "." in RAMPS1.4 --Iamepic (talk) 14:16, 5 February 2014 (PST)

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current07:09, 2 October 2011 (3 KB)Misan (talk | contribs)Arduino test code: It switches on and off all the MOSFET outputs (this will make the leds blink) just be careful not to have the heated bed and extruder heater connected unless you want to heat them. Plus it will move back and forth all the stepper motors
  • You cannot overwrite this file.

The following file is a duplicate of this file (more details):

There are no pages that link to this file.