Notifications
Clear all

Hello from Reno NV.

56 Posts
7 Users
5 Likes
1,829 Views
(@olddude)
Member
Joined: 1 year ago
Posts: 26
Topic starter  

@will I get this message during an attempt to compile my sketch?  I can't find a reference to it anywhere.  


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2502
 

@olddude 

Seriously ?

Think how we're supposed to explain a compile time error that you get compiling your sketch when you don't show us either the error message nor the code.

Anything seems possible when you don't know what you're talking about.


   
Ron reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6512
 

@will @olddude See Help for instructions how to post code and post a picture of the error

 

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, PLI/1, Pascal, 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.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6512
 

@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, PLI/1, Pascal, 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.


   
ReplyQuote
(@olddude)
Member
Joined: 1 year ago
Posts: 26
Topic starter  

@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'


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6512
 

@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, PLI/1, Pascal, 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.


   
ReplyQuote
(@olddude)
Member
Joined: 1 year ago
Posts: 26
Topic starter  

@zander 

will do


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

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


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6512
 

@olddude Should look like this

Screen Shot 2022 09 25 at 12.38.18
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, PLI/1, Pascal, 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.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2502
 

@olddude 

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.


   
ReplyQuote
(@olddude)
Member
Joined: 1 year ago
Posts: 26
Topic starter  

@will I can't thank you enough.  


   
ReplyQuote
Page 4 / 4