Notifications
Clear all

Programming Basics

17 Posts
12 Users
10 Reactions
6,565 Views
(@psych)
Member
Joined: 5 years ago
Posts: 1
Topic starter  

what about a small series on writing programming?  I'm sure there are probably a lot of people would find that helpful.


   
toolmaker, beberts and Nippy reacted
Quote
(@anibal)
Member
Joined: 5 years ago
Posts: 39
 

Good morning, I’m certainly all for this idea. Before Bill’s State of the DroneBot Workshop address I often wondered how he does it, how does he find the time. I know it’s about passion, desire and motivation to do it and I do hope with our support he will consider this idea. I think it an important if not vital skill to have in electronics on our level.

Thanks,

Anibal


   
acenite1 and toolmaker reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@anibal

Just post your code (and any questions about code) here... there are many competent programmers here willing to help!

Cheers!


   
ReplyQuote
TKBTheLegend
(@tkb)
Engineer/builder
Joined: 5 years ago
Posts: 14
 

maybe Bill could make a video on just programing. an INDEPTH how to. to programing. 


   
toolmaker reacted
ReplyQuote
AngeloB
(@angelob)
Member
Joined: 5 years ago
Posts: 44
 

@robotics-lab

that would be great


   
toolmaker reacted
ReplyQuote
(@toolmaker)
Member
Joined: 5 years ago
Posts: 10
 

Hi Everyone, I am in the same boat regarding writing code. I can build the hardware most times but then can't  do anything with it as I don't know how to program it. I even tried XOD as it looked easier but unless I know what each node does I am back to square one. I would dearly love to know how to do it. I got through the XODing tutorial that Bill did which was great, but it was just following him picking up the nodes and once I had new operations to do on my circuit I was lost. I have looked closely at all the nodes in the XOD library but the jargon baffles me. 3 cheers if Bill does an in depth tutorial on it.

Steve


   
ReplyQuote
(@toolmaker)
Member
Joined: 5 years ago
Posts: 10
 

@frogandtoad Hi My project is:-

Thank you for your interest in my problem. I will prepare some data and diagrams and re-post it. I am building this for my local railway club and there is no urgency involved at all. Very basically, I have a custom built turntable in N-Guage and I have designed the trackpositions around a proprietry 6-stall model engine stable which has each entry track at 7.5 degress radially spaced. The other exits and entries are all denominations of 7.5 degrees ie; 90, 45 and 15. My idea was to have 5 press buttons on a breadboard labelled ACW 7.5 - ACW90-HOME- CW90 and CW7.5.  I would require the HOME button to send the stepper (28BYJ-48) to a nominated entry track position which has a tiny micro switch for home signal.  Then if I pressed the ACW7.5 say 3  times, the stepper should travel 22.5 degrees anticlockwise, similarly, if I pressed the CW90 it would go 90 degrees clock-wise. Any time I press HOME it must go to the entry track again. That is a nutshell description of my needs and I have an Arduino Uno clone(freetronics eleven) with stepper driver mini-board. I have succeeded in making the Stepper go using the sketches in Arduino library with C++ but I have given myself a headache trying to program my above instructions. LOL'.

Kindest regards, Steve

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2185
 

@toolmaker,

For those of us not familiar with the model railroad jargon like "a proprietary 6-stall model engine stable" you need to explain it in more detail.  I googled "model engine stable" without success as the term "stable" didn't seem to help in the search.  Is this some kind of rotary thing for turning turning the model train engine onto different tracks? Have you already built the hardware including the stepper motor connection to that hardware?  You might post the code you have used to make the stepper go so it can be explained and how to change or add to it so you can move the stepper the way you want.  However provide this information in another post in another part of the forum?

https://forum.dronebotworkshop.com/model-railroads/

 

 


   
ReplyQuote
(@toolmaker)
Member
Joined: 5 years ago
Posts: 10
 

Hi Casey,

thanks for the reply post , I will put a more detailed request in the forum you suggest. Cheers, steve


   
ReplyQuote
(@dkilzer)
Member
Joined: 5 years ago
Posts: 6
 

@Toolmaker
It seems like this could be done with grbl jog commands and homing since the inputs are all manually given. Depending on how accurate you place your incoming tracks you would simply need to figure out how many steps each position requires. Then you would only need 3 buttons for CW ACW and home as the jog command can buffer a few inputs, so it would work like you specified as each button press could move one stall position.

https://github.com/gnea/grbl/wiki/Grbl-v1.1-Commands
You could use something like Candle CNC software to figure out the steps for the locations and test operation of the turntable.
Just some ideas, sounds like a fun project!


   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1109
 

@dkilzer

Welcome to the forum. As Casey has suggested this discussion really belongs in the Model Railways forum, as it's a bit off track (if you'll pardon the pun!).

A "general" series on programming seems like a formidable task. However, I have considered doing videos and articles about the basics of using C++ and Python, as they are the two most common languages we'll be using.

Would those types of videos be of interest?

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
toolmaker and dkilzer reacted
ReplyQuote
(@toolmaker)
Member
Joined: 5 years ago
Posts: 10
 

@dkilzer

Thank you dk, mucho apprechiato your response, I am still trying to get my head around coding. I sure do hope that Bill does a whole series of XODding about because I sure do need it.

Cheers

Steve


   
dkilzer reacted
ReplyQuote
(@dkilzer)
Member
Joined: 5 years ago
Posts: 6
 

Sorry for derailing the thread..  ? and the pun. ? 

Most of my coding experience was years ago so I think it would be a nice resource also. 


   
ReplyQuote
Jbell
(@jbell)
Member
Joined: 5 years ago
Posts: 2
 

1st, I am new to the forum so my feedback may be somewhat naïve in the general sense.  Programming is a very difficult subject to teach as it’s always limited to the requirements of the project.  In the most perfect world you would sit down and analyze the project and then decide what hardware you need to use and then layout what software would need to handle.  Like Bill’s last video on the differences between the Arduino and Raspberry Pi.  You notice there are also differences between the programming languages and how the code is written and built-in functions.  Again the perfect world would allow you to pick all this in advance to make the project as easy as possible.

In the real world you usually have an idea and you start the solution using the tools you have or know.  The process of writing the code becomes an iterative process of solving each problem and then going to the next.  Hopefully you won’t hit the wall and realize you need to start over with another hardware/software pairing.  So, my feeling is Bill certainly could go into more detail in his planning approach and logic behind the code he implements.  Even the debugging techniques and code/logic change process are of huge value when it doesn’t work.  One of the posts mentioned there are some great resources in the forum for providing help when you just can’t find the problem on your own.  My own experience is I often found the problem myself when I was trying to explain it to someone else.  Crowd sourcing is powerful.

So I believe it would be of value to have the videos go into more detail of the behind the curtain process of planning and program development.  Seems that most of us want to learn how to fish and not just eat the cooked meal. 


   
ReplyQuote
(@acenite1)
Member
Joined: 4 years ago
Posts: 1
 

@frogandtoad

Hi i really like your idea on the coding area.  I have tired to make a few things and all i keep getting is errors and don't know where to turn i have looked online but i haven't found the right video's that help.  Any help or suggestions to try would be of great help.  

Thanks


   
ReplyQuote
Page 1 / 2