I'm trying to run a stepper motor using CONTROLLINO MEGA and a stepper driver (DM332T), but I'm not gettin' much progress.

One of the things that calls my attention is that I use pin D8 (for example) of controllino as an output. When I run the code, the light of this pin should blink according to the code. The impressive thing is that pin 8 remains off and pin 6 does what pin 8 should do.

So I tried to use one of the example codes on ARDUINO IDE library (Basics>Blink). I use it to make pin 10 blink, but the pin that blinks when I run the code is pin 8. If I want pin 7 to blink, is the pin 5 that does it. Basically, the pin that I use in my codes does not do what it should. Instead, the pin "2 positions earlier" does it.

Is it normal? I'm getting confused because I'dont know how should I build the circuit (to run the motor) because of this.

Thank You!!

I think you forgot something...

What? It's my first time using ARDUINO and similars,. Could you help me? Thanks

Please post a link to the board that you are using

Meanwhile have a look at the pin out for a mega and make sure you have selected that board from the IDE .

We need the board detail and the sketch putting up between code tabs .

You may check the CONTROLLINO pining versus Arduino pinning.

1 Like

Thanks, How can I do that?

Have a look at the diagram and see where D6 connects to the processor ( it’s too blurred on my phone ).
Have a look at the schematic for a Arduino Mega and see where D6 connects - if they are different that’s the issue .

There must be some examples with a library for that device , they may help too as will a good look at the documentation . As it’s not an Arduino product there may well be such differences , such as bringing out more I/O Pins .

Have you downloaded the library for the board

1 Like

What you observe is normal for this board, the pinout is different. Go to their website, everything you need is there.

Yes I did! But you were right!! The schematic of CONTROLLINO MEGA match' each pin to ARDUINO MEGA, and it happens exactly what I was describing I think:

So I guess that if I want to do something with PIN 7 on CONTROLLINO MEGA, I have to write PIN 9 on ARDUINO IDE, right? Even If I have loaded the library of CONTROLLINO..

Otherwise, I think I have to use the above table, but Im not sure how to interpret it... Any explanation?

There is a board manager and you select that board within the ide ( and not Arduino mega ) I would have thought all the differences would be then be sorted out for you .
I see from the site , there are downloads to install. Have a good read of the instructions , it does include a board manager and controllio should then appear in your boards list and the O/I then line up

1 Like

Yes, this is the firs that I did before running any code. I have selected CONTROLLINO MEGA on tools>board and I have included the controllino library on the top of the code, but still PIN 8 blinks when I want PIN 10 to do it.

Hmmm … dunno then .!!

Might be a question for their tech support.

Run some of their examples and see what that does

1 Like

In your sketch ( located in this post - please don't crosspost, put all information in one thread ) you use simply numbers to address the pin. You should try with 'D10' instead. In the schematic above '10' relates to 'D8', and '12 to 'D10'. I assume the CONTROLLINO board definitions map 'D10' to the correct pin.

Other topic LOCKED.

Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

I took a look at 'controllino.h'. There are these defines:

  #define CONTROLLINO_D0 2
  #define CONTROLLINO_D1 3
  #define CONTROLLINO_D2 4
  #define CONTROLLINO_D3 5
  #define CONTROLLINO_D4 6
  #define CONTROLLINO_D5 7
  #define CONTROLLINO_D6 8
  #define CONTROLLINO_D7 9
  #define CONTROLLINO_D8 10
  #define CONTROLLINO_D9 11
  #define CONTROLLINO_D10 12
  #define CONTROLLINO_D11 13

So you need to use CONTROLLINO_D10 as your pin name if you want it to be output on D10.

1 Like