Welcome! Log In Create A New Profile

Advanced

using the unused arduino pins

Posted by jbernardis 
using the unused arduino pins
November 15, 2012 01:06AM
I notice on the RAMPS board that a large number of arduino pins are not being used. I even have an LCD on my printer and there still is a large number of pins seemingly available.

I know I would be subject to current limitations, but am I right in assuming that I can use these pins for my own purposes? It would be great if this were so because, for marlin at least, I can control these pins via code and, therefore, very easily from my host software. I believe there are even some PWM pins available which would make it relatively simple, with a small transistor circuit, to control the speed of a couple more fans.
Re: using the unused arduino pins
November 15, 2012 07:15AM
Sure. With Teacup firmware you can configure an unlimited number of devices, see the DEFINE_HEATER section in config.h. And no, _HEATER_ doesn't mean the device has to actually heat something, it can also be a fan or a lamp or a refrigerator smiling smiley Works for PWM and non-PWM, the corresponding G-code is M104.

In Sprinter and Marlin, you have M42 to turn arbitrary pins on and off.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: using the unused arduino pins
November 15, 2012 07:23PM
im beginning to understand how these things work ...


but i got lost when i hear you guys say M104, M42 ... what are these?
Re: using the unused arduino pins
November 16, 2012 02:12AM
These are g code commands. G code normally consists of the movement and extruding commands that your slicer produces, but there are many other commands available (and not all of them start with G) that let you do things like turn arduino pins on and off, set firmware parameters, etc. Most host software provides some mechanism where you can enter g code interactively to directly control you printer.
Re: using the unused arduino pins
November 16, 2012 07:18AM
A description of most (all?) available G-codes is here: [reprap.org]


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: using the unused arduino pins
November 17, 2012 12:58AM
k im just intrigue by this part ... how does 1 use this? if i guess ... there is 1 pin thats a trigger ...

G29-G32: Bed probing
G29 Detailed Z-Probe
probes the bed at 3 points.
G30 Single Z Probe
probes bed at current XY location.
G31 Report Current Probe status
reports whether Z probe is triggered.
G32 Probe Z and calibrate with FPU
probes the bed at 3 points and updates transformation matrix for bed leveling compensation.
Sorry, only registered users may post in this forum.

Click here to login