Albert Palomas

Electronics & Life Lover

Scratch 4 Arduino with Adafruit Motor Shield v2

S4A is a powerful platform to learn programming Arduino but by default it can’t be interfaced with Adafruit Motor Shield. I have rewritten S4A firmware in order to achieve this goal.

You can download firmware from here.

I have tested it on Arduino UNO and this shield.

This is the relationship with S4A variables and Adafruit Motor Shield outputs:

S4A Adafruit Motor Shield
Analog 5 Speed DC Motor 1
Analog 6 Speed DC Motor 2
Digital 10 Direction DC Motor 1 (HIGH = FRONT) (LOW = BACKWARD)
Digital 11 Direction DC Motor 2 (HIGH = FRONT) (LOW = BACKWARD)
Digital 7 PWM Servomotor 1
Digital 8 PWM Servomotor 2


For compiling this firmware you will need Adafruit Motor Shield Library. It can be downloaded from Adafruit website:


  1. I have tested the framework with S4A and Arduino Uno but this don´t work. Please let me know how to get it.

Leave a Reply

Your email address will not be published. Required fields are marked *

© 2020 Albert Palomas

Theme by Anders NorenUp ↑