Quantcast
Channel: fritzing forum - Latest posts
Viewing all articles
Browse latest Browse all 29608

Schematic to breadboard layout

$
0
0

I mentioned it on the arduino forum, this is what a couple of people said "You need the same amount of { as }. The brackets around toggle=1 are probably wrong. Try to autoformat the source to make it better readable.

You need more discipline when you code. Computers are machines and use a syntax that has to be strictly adhered to.

you need to have the same amount of { as }. But moreover, they need to be placed correctly.

The usual way of placing brackets is the following: When starting a block (Something between brackets) Place the opening bracket at the end of the first line, indent the code inside the bracket, place the ending bracket alone one it's line, at the same indentation than the start of the block.

Here is an example :
void myCode(int someParameter) {
for (i = 1 ; i<8 ; i++) {
analogWrite(13, someParameter)
}
}

Looking at the closing brackets, you know instantly to which block it belongs.

Rearange your code, and you will find the missing closing brackets. (The Arduino IDE is very helping in this task: when you select a bracket, it highlights it's matching counterpart. Use this help.)

Moreover, know that updateShiftRegister() is a function that is used by your sketch. It is like a little helper that simplifies the code inside the loop() portion of your sketch, but is independent of the loop(). Think of it as giving a name to a piece of code that can be used over and over in the loop, without re-writing the same code each time. Therefore, it has to reside outside of the loop. Make sure that the closing bracket of the loop() is before the code for updateShiftRegister()." I had a play today. Don't think I'm going to get this sorted because even if I did I'd then have to be able to program it somehow so the green does light up when track is play and also light up red when recording. Don't think I'll manage this. Going to probably have to keep it simple just have the peddles one LED and a screen. But I really don't want to go down that route


Viewing all articles
Browse latest Browse all 29608

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>