We will start by hot gluing a section of a zip-tie to the Limit Switch to extend the length of the switch’s arm.
Now, we will solder two wires onto the Limit Switch. Connect one to the “NO” lead and the other to the “O” lead. You can follow the Fritzings posted below.
Next, you must place the limit switch inside of its 3D printed holder. Let the wires on the limit switch feed through the slots in the holder.
Now, connect the NO wire to the GPO port on the builder base, and the O wire to the 5V port on the builder base.
To finish, place your limit switch in a position on your 3D printer where it won’t be triggered until the end of the print. For our printer, we placed it beneath the build plate as the build plate always returns to its home position at the end of the print.
**Be careful in your placement of the switch! It is possible to damage your 3D printer if improper placement is used.**
Building the Firmware
In this section we will build the firmware used in this project. Navigate to the Firmware and select "+ Create New".
You will now be prompted to name your firmware file, we named ours "Limit Switch SMS".
Now, select the “+ Add Hardware” button and add a button device to your firmware.
Now we will select and configure our driver. Select GPIO for the driver, then set the Pin to GP0, Debounce to Enabled, and Pin Mode to Input Pull Down.
Now, save your Firmware File and upload it to the client that your limit switch is attached to!