Notifications
Clear all

Constructor Error

31 Posts
4 Users
8 Likes
1,483 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

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.


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

@barrie Excellent. I wonder why mine didn't work. Formating is still a little off, try using Tools/Autoformat until your fingers learn where to put things. Finally, ALL parameters need a type as well as functions even if it's just void.

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.


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

@barrie You declare stepSpeed1 and 2 globally and then use the same name as a parameter but incorrectly without a type. Either make it global or not, but using it as a global and a parameter is confusing. For instance the function newSpeed. There are other examples.

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.


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

@barrie The highlighting used to appear in the old HTML  code post, now it doesn't. 

Progress?

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.


   
ReplyQuote
barrie
(@barrie)
Member
Joined: 2 years ago
Posts: 86
Topic starter  

Thank you both for your time, patience and help. I think I understand the problem and fairly confident that I will sort it out tomorrow.

By the way @Zander I live on the edge of a chasm (literally) and often thought of crossing it in 2 leaps. You  need to know that your advice is gratefully appreciated. 🤔 😀  


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

@barrie I just received 4 NEMA17 steppers, maybe I will 'borrow' your sketch to exercise them. Did you write that from scratch or build off another sketch? If so what one?

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.


   
ReplyQuote
barrie
(@barrie)
Member
Joined: 2 years ago
Posts: 86
Topic starter  

@Zander 

I put both together and now modifying it.

I always go to Bill's Web page..... best in class.

 See Contents #9 Demo 2
 

https://dronebotworkshop.com/stepper-motors-with-arduino/

 

This post was modified 2 years ago by barrie

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

@barrie Ok, then it should be fairly easy unless you don't have years of programming experience then it might be a bit of a challenge.

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.


   
ReplyQuote
barrie
(@barrie)
Member
Joined: 2 years ago
Posts: 86
Topic starter  

@inq @zander

Just fixed the problem Thanks to you both. 

 

   
Ron reacted
ReplyQuote
barrie
(@barrie)
Member
Joined: 2 years ago
Posts: 86
Topic starter  

@zander Its getting easier. My programming days were over many years ago and I am very rusty. I'm a little embarrassed at my recent mistake and still very rusty but determined to get this project done and hope I don't take up too much of your precious time.


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

@barrie No problem, I enjoy helping people. It will come back fast once you get into it.

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.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@inq

 Posted by: @inq
Posted by: @barrie

Oh dear! version 2.0 does not have 'Copy as HTML'. I Sorry, I don't understand the relevance of '^'.

I will try to post the entire code using version 1.8.19.

No, you don't need to do that.

Simply highlight all the text you want to include from whatever editor 2.0, 1.8.19, any other editor.  I use Notepad++ for instance.

In this forum's editor, simply click the <> button where you want to add source code.

Paste it in the popup window... Done.

image

Unfortunately, the [code (or whatever they're using these days] html tag does not provide html formatting with syntax highlighting... for that you really do need the 'Copy as HTML' available from within the older Arduino editor (or another editor), but unfortunately that is not available in the new editor for some reason!

Perhaps it could be requested as an enhancement to the new IDE?

Cheers


   
Ron reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @barrie

My programming days were over many years ago and I am very rusty. I'm a little embarrassed at my recent mistake and still very rusty but determined to get this project done

Keep at it...  it's that bike riding thing.  If you could do logic back then, you still can now.  Syntax is just memorization and/or muscle memory.  The mistakes we found indicate you might have JavaScript in your background.  The syntax is very similar to C/C++ yet doesn't care about declaring variable types.  C/C++/INO are very rigid about that kind of thing.  

You might benefit from doing one of the Internet tutorials.  I'm thinking a written one with examples being better than a video based one.  You'd be able to skip quickly over the things you remember and slow-up when you need a refresher.  Video's lock you in to their rate.

VBR,

Inq

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


   
Ron reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 
Posted by: @frogandtoad

Unfortunately, the [code (or whatever they're using these days] html tag does not provide html formatting with syntax highlighting...

I've always kind of zoned-out when you all started talking about html copy, etc.  Your comment here finally clicked for me and I tried the 1.8.x copy as HTML and pasted to the <;> box.  Now, I understand.  Thanks.

I don't use the IDE editor.  I use its Use external editor option and use Notepad++ to get the detailed color highlighting I want among many other features I use.  As color highlighting is lame in the Arduino IDE and is a very subjective thing anyway, I don't find that HTML feature all that compelling.  But...  I'm also sure many would find my choices of colors distracting.  

image

 

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
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@inq

Posted by: @inq
Posted by: @frogandtoad

Unfortunately, the [code (or whatever they're using these days] html tag does not provide html formatting with syntax highlighting...

I've always kind of zoned-out when you all started talking about html copy, etc.  Your comment here finally clicked for me and I tried the 1.8.x copy as HTML and pasted to the <;> box.  Now, I understand.  Thanks.

I don't use the IDE editor.  I use its Use external editor option and use Notepad++ to get the detailed color highlighting I want among many other features I use.  As color highlighting is lame in the Arduino IDE and is a very subjective thing anyway, I don't find that HTML feature all that compelling.  But...  I'm also sure many would find my choices of colors distracting.  

image

 

I understand, however, the new Arduino IDE does have far better syntax highlighting available, as it it based on the Microsoft VScode Theia IDE framework - It just unfortunately does not offer that copy to HTML option as does the older 1.9.x IDE.

Cheers


   
ReplyQuote
Page 2 / 3