@will I get this message during an attempt to compile my sketch? I can't find a reference to it anywhere.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.
@olddude Also, it would help if we knew what your invention is, pictures, some sort of description?
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.
@will Here is my first attempt to write a sketch.
void setup() {
const int STEPS_PER_REV = 200;
const int SPEED_CO
Stepper stepper_NEMA17(STEPS_PER_REV), 8,9,10,11);
}
void loop() {
stepper_NEMA17SetSpeed. setSpeed(motorSpeed);
stepper_NEMA17. step(STEPS_PER_REV / 100);
Delay Microseconds (1000);
]
]
This is the response from Arduino
void setup() {
const int STEPS_PER_REV = 200;
const int SPEED_CO
Stepper stepper_NEMA17(STEPS_PER_REV), 8,9,10,11); This line is highlighted (error msg below)
}
void loop() {
stepper_NEMA17SetSpeed. setSpeed(motorSpeed);
stepper_NEMA17. step(STEPS_PER_REV / 100);
delayMicroseconds(1000);
]
]
(expected initializer before 'stepper'
@olddude Please read HELP on how to post code and post a picture of the error you get with a screen grab (Mac Shift Cmd 4, Win ?????)
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.
This should work better, but the SPEED_CO statement needs finishing. And see other comments in code.
// These are called global variables and constants. // They need to be seen by all parts of your code. const int STEPS_PER_REV = 200; const int SPEED_CO // <= This is not a statement. Stepper stepper_NEMA17(STEPS_PER_REV), 8,9,10,11); void setup() { } void loop() { stepper_NEMA17SetSpeed. setSpeed(motorSpeed); stepper_NEMA17. step(STEPS_PER_REV / 100); // This is not a valid statement... Delay Microseconds (1000); delay(1000); // This is. // ] This is not valid here... stray character. // ] // You had no curely brace to end }
3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide
@olddude Should look like this
void setup() { const int STEPS_PER_REV = 200; const int SPEED_CO Stepper stepper_NEMA17(STEPS_PER_REV), 8,9,10,11); } void loop() { stepper_NEMA17SetSpeed. setSpeed(motorSpeed); stepper_NEMA17. step(STEPS_PER_REV / 100); Delay Microseconds (1000); ] ]
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.
This version compiles clean, it doesn't do anything and I guessed at your speed declaration
#include <Stepper.h> const int STEPS_PER_REV = 200; const int SPEED_CO = 1; Stepper stepper_NEMA17(STEPS_PER_REV, 8, 9, 10, 11); void setup() { stepper_NEMA17.setSpeed(SPEED_CO); } void loop() { stepper_NEMA17.step(STEPS_PER_REV / 100); delayMicroseconds(1000); }
Anything seems possible when you don't know what you're talking about.