Training and testing for new users.

PLEASE DONT POST YOUR ANSWERS WITHIN THIS THREAD !

It will be better if you discuss the problems offline, or in a new, different thread - so this topic remains ‘clean’, and doesn’t confuse other newbies with incorrect ‘guesses’ that mislead others.

Nice work LarryD

  1. What does /* and *\ do to the lines of code that are written between these character pairs?

Is that a typo, or a trick question?

(Ctrl-t doesn’t do anything on MY Mac)

Typo, now corrected.

What’s a Mac :wink:
Changed: Ctrl+T, Cmd+T,

Arduino questions

To be more useful online (or in general), you (we?) should design a set of "multiple choice" answers for each question. A good set of multiple choice answers (which are harder to design than you might think.)
For additional usefulness, figure out how to randomize questions/answers so that if you take the test again, the answers will be different.
(Hmm. Does anyone know of sites that let you generate and provide "online quizzes"? I've seen some good quizzes on EdX and Coursera a similar, bit I'm pretty sure they don't allow just anyone to generate classes...)

ElectroDFW:
As a hardware technician just getting started with an Uno, 95% of those questions are Greek to me.

37. What does a pull down resistor do to a floating input pin?

ddq.png
Figure-1: Explaining the importance of internal pull-up, external pull-up, and external pull-down.

Consider bit-2 IO line of Port-D Register. When this IO line is configured to work as an input line, it takes over the symbolic name -- PIND2. The external button (K1) can be connected with this input line via DPin-2 (Digital Pin Connector) of Arduino UNO.

In Fig-1, there are there are three resistors (R1, R2, and Rp) around DPin-2. R1 is an external pull-down resistor placed by the user; R2 is an external pull-up resistor placed by the user; Rp is an internal pull-up resistor placed by the designer of the ATmega329P Microcontroller. The resistors are associated with switches by which they could be connected or disconnected.

When all the switches are at opened condition, the input line assumes no definite voltage level. The voltage levle of DPin-2 could be 0V or 5V or in between or all the time changing. This is known as floating condition of the input line.

The insertion of the external pull-down resistor (R1) will propagate 0V from the GND-pin onto DPin-2; now, the DPin-2 is no more at the floating state. When button K1 is closed, the DPin-2 will assume LH state.

The insertion of the external pull-up resistor (R2) will propagate 5V from the 5V-pin onto DPin-2; now, the DPin-2 is no more at the floating state. At this condition, the 5V terminal of button K1 has to be connected to GND. When button K1 is closed, the DPin-2 will assume LL state.

The insertion of the internal pull-up resistor (Rp) will propagate 5V from the 5V-pin onto DPin-2; now, the DPin-2 is no more at the floating state. At this condition, the 5V terminal of button K1 has to be connected to GND. When button K1 is closed, the DPin-2 will assume LL state.

34. What does INPUT_PULLUP do in this line of code? pinMode(2, INPUT_PULLUP);
The execution of the pinMode(2, INPUT_PULLUP); function configures DPin-2 to work as input line along with the internal pull-up resistor connected. If we don't to connect the internal pull-up (sometimes, we don't need it because of very high value; it does not work for me with external interrupt lines), we execute the instruction pinMode(2, INPUT);. In this case, we have to connect the external pull-up or pull-down as per requirement/convenience to avoid floating condition of the input line.

ddq.png

15. What is SRAM? Read write memory, where changeable/dynamic variables are.
Static Random Access Read Write Memory, [...].

17. What two ways can you restart your Arduino?
When we say restart -- it specifically refers to 'again start when it is already in running condition' similar to a 're-trigger-able one-shot. The Arduino UNO can be restarted in two ways:

(a) by pressing/releasing the on-board RESET switch
(b) by re-invoking the Serial Monitor.

31. If the A0 pin is connected to 2.5 volts, what is the value of foo? unsigned int foo = analogRead(A0);

The variable foo will contain the bit pattern : 0000000111111111 (0x01FF)


Figure-1: Internal structure of ADC of ATmega328P Microcontroller

The analogRead(A0); command selects Ch-0 of the ADC and connects the 2.50V signal to the input of the 10-bit uni-polar ADC. After conversion, the 10-bit binary value is stored inside ADCL and ADCH Registers from which the value enters into user defined variable foo.

How does the value come up to: 000000111111111?

When the input to the ADC is equal to the VREF (the 5V -- called Full Scale value), the ADC value is all 1s (1111111111 = 1023)

When the input to the ADC is equal to VREF/2 (2.50V), the ADC value is (1023/5)*2.50 = 511 = 0111111111.

In Fig-1, we see that the upper 6-bit of the ADCH Register is always 0s; as a result, the value that enters into the variable foo is: 000000 0111111111 = 0x01FF.

Thise mentioned are 'HARDWARE resets' - there are several additional methods that will 'reset' your AVR microcontroller chip - all are just as important - as they often catch beginners unexpectedly.

AVR reset sources

Possibly the most interesting is the Watchdog reset - read up on it...!

Does anyone know of sites that let you generate and provide "online quizzes"?

I found ProProfs Quiz Maker, which seems to do most of the things I wanted such a site to do. It says it will add advertisements to quizzes after the "Free Trial Period" ends, unless I upgrade to a relatively expensive paid plan. I'm not sure how obnoxious that will be.
And I might lose any images (currently I only have the Arduino Logo, but the various fritzing images might not work. I'll have to see if they can be hosted elsewhere and still used.)

Here's a short (11 question) test based on some of LarryD's software-oriented questions.

Arduino Quiz #1: The Programming Language"

As a hardware technician just getting started with an Uno, 95% of those questions are Greek to me.

Well, that's as it should be, right? If you could get the correct answers even though you had very little experience with an Arduino, it wouldn't be very useful as a quiz, would it? Tests should be guides to learning, not something that you can get 100% on at your first try (unless you're already an expert on the subject material.)

@westfw looks very good.

A step up from beige on white. :wink:

Edit:
If that website disappears, I guess you loose access to the quiz.
They are in control.
Hosting it here, keeps things local.

westfw:
I found ProProfs Quiz Maker, which seems to do most of the things I wanted such a site to do. It says it will add advertisements to quizzes after the "Free Trial Period" ends, unless I upgrade to a relatively expensive paid plan. I'm not sure how obnoxious that will be.
And I might lose any images (currently I only have the Arduino Logo, but the various fritzing images might not work. I'll have to see if they can be hosted elsewhere and still used.)

Here's a short (11 question) test based on some of LarryD's software-oriented questions.

Arduino Quiz #1: The Programming Language"

I didn't find the ads excessive, but I did notice them.

There is a problem when representing code: the first letter of any answer is capitalized. This makes most of the "correct" answers of question 3 wrong actually. (counter++ does not increment the value of the variable Counter.)

This test bank is impressive Larry! Bravo! What's your licensing agreement for those who teach this stuff in community college (for $900/semester load hour? Not me - my adjuncts. They will eat this stuff up!)

ps, beige on white is easily readable without highlighting by the colorblind.

There is a problem when representing code: the first letter of any answer is capitalized. This makes most of the "correct" answers of question 3 wrong actually. (counter++ does not increment the value of the variable Counter.)

Huh. Fixed. This actually occurs during the "rendering" of the question; I checked, and in the "source code" for the quiz, the capitalization was correct. I finessed the issues my calling the variable "Counter" :slight_smile:
(and I submitted a "suggestion." And another one for the "license" issue.)

beige on white is easily readable without highlighting by the colorblind.

Really? That's interesting. They never tell you that there are things that the colorblind can see BETTER.

Curious - my score was marked out of 59, but the leaderboard was drawn from much higher possible scores... ?
OK - I missed the NULL termninator ! :-[

lastchancename:
Curious - my score was marked out of 59, but the leaderboard was drawn from much higher possible scores... ?
OK - I missed the NULL termninator ! :-[

Me too. And because of that, I didn't check my score!

larryd:
...What’s a Mac :wink:
...

:o It's a type of PC that runs Unix instead of DOS.

They keep track? Even though I'm not paying?

I think that originally I had the quiz evaluated as a percentage (0-100%), but when I wanted to add multi-part questions ("check all that apply") that had partial credit, that made it go to a n/m style score. Strange that the top scores weren't reset. I wonder if I can reset them manually? (Nope; not without upgrading.)

(Hmm. Something seems to have made the quizzes "private"; perhaps when my "free trial period" ended. Fixed.)

I like the test idea and format...
Perhaps ‘Arduino’ themselves might come to the party and support the platform - so the quizzes can be maintained semi-professionally.

The opportunity for real beginners to learn is phenomenal.
Thanks for getting this far