Please, can someone help me with this sketch? Originally it was written for lcd display but I need it for
7 segment led, but it wont work.So pleeeease, what em i doing wrong?
VDI_Experiment_1.ino (5.93 KB)
vdi_experiment_7seg.ino (3.92 KB)
Please, can someone help me with this sketch? Originally it was written for lcd display but I need it for
7 segment led, but it wont work.So pleeeease, what em i doing wrong?
VDI_Experiment_1.ino (5.93 KB)
vdi_experiment_7seg.ino (3.92 KB)
What happens? What is the problem?
How can i post the sketch?
In code tags. Please read the post:
How to use this forum - please read.
float sensorValuex = 0; // assign a floating point value of "0" to a variable called "sensorValuex"
float sensorValuer = 0; // assign a floating point value of "0" to a variable called "sensorValuer"
float slope; // assign a floating point value of "0" to a variable called "slope"
int n = 0; // assign an integer value of "0" to a variable called "n"
int cursorClmn = 0; // assign an integer value of "0" to a variable called "cursorClmn"
int numSamples = 0; // assign an integer value of "0" to a variable called "numsamples"
float slopeTotals; // assign an integer value of "0" to a variabel called "slopeTotals"
float slopeAve = 0; // assign an integer value of "0" to a variable called "slopeAve"
int VDI = 0; // assign an integer value of "0" to a variable called "VDI"
If your teacher told you you have to comment everything, this is not what she meant.
float slope; // assign a floating point value of "0" to a variable called "slope"
It's a good job crt0 does what you forgot to do.
void loop()
{
first:
Uh - oh.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Thanks.. Tom.... ![]()
The problem is that it wont print the forecast on display.
bukovo:
What em I doing wrong?
bukovo:
How can i post the sketch?
Was reading the how to use the forum post that hard?
Fixed it ![]()
bukovo:
Please, can someone help me with this sketch? Originally it was written for lcd display butI needwould like it for
7 segment led, but it wont work.So pleeeease, what em i doing wrong?
Okay, to the code. Holy cow, that is the worst piece of code in times. Someone got the "use documentation"-note but missed every other note... Like:
int cursorClmn = 0; // assign an integer value of "0" to a variable called "cursorClmn"
YESSS, we can see that! But what does it actually mean!
And the "don't use goto"-note. It's C++, use a function, please!
Okay, and then up to 7-segmenting.
byte numDigits = 2;
byte digitPins[] = {4, 5};
byte segmentPins[] = {6, 7, 8, 9, 10, 11, 12, 13};
sevseg.Begin(1,2,3,4,5,6,7,8,9,10,11,12,13);
sevseg.PrintOutput();
Have you even read the Library help page? Declaring useful variables then not using them and calling Begin() with a bunch of random variables... Calling a non existing function in loop... Why?
OK
Thank You for advice (programming is not for me)
regard
We don't say that
But you should not start with crap code like that. Starting with crap makes everything difficult ![]()
This "if" is not like the others.
if (VDI > 45, VDI < 65); {
It needs two changes if (VDI > 45 && VDI < 65) {