Skip to content

Sketch didn't work on Apple M1 Pro Sonoma v14.1.2 #125

Open
@YanisDeplazes

Description

@YanisDeplazes

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Example sketch code:
    `/*
    Simple demo with DRV8255 driver on CNC shield

    Connect STEP, DIR as indicated!
    Driverslots X, Y, Z on the CNC shield can be used

    In this demo driver chip is in slot X (pin 5, 2)

    Adapted 2021/2022 by Gordan Savicic
    based on Copyright (C)2015-2017 Laurentiu Badea

    This file may be redistributed under the terms of the MIT license.
    A copy of this license has been included with this distribution in the file LICENSE.

*/
#include <Arduino.h>
#include "BasicStepperDriver.h"

// Motor steps per revolution. Most steppers are 200 steps or 1.8 degrees/step
#define MOTOR_STEPS 200
#define RPM 120

// Since microstepping is set externally, make sure this matches the selected mode
// Set the jumper to middle position when using MICROSTEPS 4, no jumper = MICROSTEPS 1
// 1=full step, 2=half step etc.
#define MICROSTEPS 1

// Driver in CNC shield X
#define DIR_X 5
#define STEP_X 2

// Driver in CNC shield Y
#define DIR_Y 6
#define STEP_Y 3

// Driver in CNC shield Z
#define DIR_Z 7
#define STEP_Z 4

// Define the pin for enable/disable functionality
#define SLEEP 8

// Initialize the driver(s)
BasicStepperDriver stepper(MOTOR_STEPS, DIR_Y, STEP_Y, SLEEP);
BasicStepperDriver stepper2(MOTOR_STEPS, DIR_X, STEP_X, SLEEP);

void setup() {
// Pass some config to the instances and begin
stepper.begin(RPM, MICROSTEPS);

// if using enable/disable on ENABLE pin (active LOW) instead of SLEEP uncomment next line
stepper.setEnableActiveState(LOW);

stepper2.begin(RPM, MICROSTEPS);

// if using enable/disable on ENABLE pin (active LOW) instead of SLEEP uncomment next line
stepper2.setEnableActiveState(LOW);
}

void loop() {
// energize coils
stepper.enable();
stepper2.enable();

// Moving motor one full revolution using the degree notation
stepper.rotate(360);
stepper2.rotate(360);

// pause and allow the motor to be moved by hand
stepper.disable();
stepper2.disable();

delay(2000); // repeat after 2sec. pause
}`

  1. Compiled the code (Worked) (On Mac)

  2. Uploaded the code (Worked) (On Mac)

  3. Motors didn't rotate as expected.

  4. When running and compiling over a windows it did work as expected.

Expected behavior
I expected the library to work on a Apple Macbook.

Platform Setup (please complete the following information):

  • Apple M1 Pro Macbook with Sonoma v14.1.2
  • Arduino IDE version 2.3.2
  • Board type (Uno)
  • Stepper driver type (A4988) 1.4.1
  • Wiring (if needed) - please note that hardware issues are outside of the scope of this project

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions