# Mini Pen Plotter

**URL:** <https://discourse.processing.org/t/mini-pen-plotter/48734>\
**Category:** Electronics (Arduino, etc.)\
**Tags:** homework\
**Created:** [June 3, 2026, 12:08pm UTC](https://discourse.processing.org/t/mini-pen-plotter/48734 "2026-06-03T12:08:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SPW48](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/spw48/32/21834_2.png) [@SPW48](https://discourse.processing.org/u/SPW48)\
**Post date:** [June 3, 2026, 12:08pm UTC](https://discourse.processing.org/t/mini-pen-plotter/48734/1 "2026-06-03T12:08:02Z")

</div>

\<Hello,  
The project is: Making a mini plotter from old CD-ROM stepper motors for the x-axis and y-axis, and a servo motor for the pen lifter.  
Control is via an Arduino UNO 3 board with a CNC shield and an A4988 stepper drive.  
How can I test this within Processing Foundation?  
Regards, SPW48

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [June 3, 2026, 9:49pm UTC](https://discourse.processing.org/t/mini-pen-plotter/48734/2 "2026-06-03T21:49:19Z")

</div>

1. Use Arduino shield to control devices (example shown below).

2. Use Processing to control the device using either a desktop computer or a mobile device (phone or tablet).

3. Processing communicates with Arduino either with USB port or bluetooth if using a mobile device; in case of the latter you would also need a bluetooth shield or an HC-05 (or similar) module.

4. The shields are stackable if you don’t already know.

 ![motorShield](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/1/21f7032f2dd8ccadf784e194383dc20b42d38784.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [June 4, 2026, 12:09am UTC](https://discourse.processing.org/t/mini-pen-plotter/48734/3 "2026-06-04T00:09:54Z")

</div>

What you are using in your Arduino ??? GRBL or what and what is the version???

Example to test pen up/down

```auto
// Keyboard input function to control the servo pen mechanism
void keyPressed() {
  if (key == 'u' || key == 'U') {
    // M5 turns off the spindle pin, telling the GRBL-Servo firmware to lift the pen UP
    grblPort.write("M5\n"); 
    println("Sent: Pen UP (M5)");
  } 
  else if (key == 'd' || key == 'D') {
    // M3 S1000 turns on the spindle at max speed, telling the GRBL-Servo firmware to lower the pen DOWN
    grblPort.write("M3 S1000\n"); 
    println("Sent: Pen DOWN (M3 S1000)");
  }
}

⚠️ VERY IMPORTANT PROGRAMMING NOTE FOR ARDUINO:

The standard version of GRBL designed for standard CNC 
machines does not natively support servo motors;
 it only supports stepper motors. 
For your servo motor to respond correctly to the M3 and M5 commands used in the Processing code above,
 you must upload a specialized "GRBL Servo Firmware 
(Pen Plotter version)" to your Arduino instead of the generic CNC version.

```
