Microcontrollers > Microcontrollers/General

arduino question

<< < (2/4) > >>

JW:
Well since "boilerplate" was mentioned.

I have a link to Arduino and its a topic I created. Its on Steamautomoble.com

https://steamautomobile.com:8443/ForuM/read.php?1,26164

Why arent you guys talking about "sketches"

Bruce S:

--- Quote from: JW on February 14, 2019, 04:42:22 PM ---Why arent you guys talking about "sketches"

--- End quote ---

Too early in the AM  ;D

SparWeb:
Something that helps me is to write "pseudocode", which isn't programming at all.

More like a series of statements written in plain english that you can read through to logically see the flow of the program.

On the first pass, just write the obvious general steps...

* Set up the input variables,
* Ask user for input,
* Calculate result,
* Display result on screen,
* Send result to serial port.
Once that's done, go to each line and add detail...

* Set up the input variables,
* length, width, height, mass
* Volume, density
* Ask user for input,
* ...
This lets you read and correct your logic as you flesh out what you want the program to do.

DamonHD:
And then those should then stay in the code as comments, to explain what you intended to do, so that when you have a bug (and did something different by mistake) you can get back to what you intended...

Rgds

Damon

clockmanFRA:
Sparweb    Excellent, .... I love fundamental structures.

I like that, now your talking!

Please do carry on.......

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version