Training and testing for new users.

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

"This far"?

I rarely see professional online testing that is this sophisticated, thorough or accurate. Especially the big publishing house quizzing services. "It marked me wrong for a correct answer" is the number 1 complaint I hear, followed closely by "It's incredibly slow".

So far this collection beats what I have sampled (sapling, mastering ..., OWL.)

I'd be afraid that, if Arduino LLC got involved, it would become a marketing tool, and feature the MKR boards and other hot items, for example.

Here's a new one: Arduino Quiz #n: History and Politics

I, um, might have had a bit of fun with this one, and I recommend not drinking any liquids while taking the quiz...
(I did try to stay away from questions that were TOO opinion-based.)
(But ... who knew that Arduino had had quite that many crises!)

Hmmph. One of the for-pay features at proprofs is apparently the "feedback per choice" (as opposed to "feedback per question.") Rats. I liked that one.

I rarely see professional online testing that is this sophisticated, thorough or accurate. Especially the big publishing house quizzing services.

It's easy to come up with a couple-dozen good questions (especially if you're rephrasing someone elses work!) and answer sets. Coming up with the problem sets for a whole textbook, or even transcribing the questions/answers from the text to an online quiz system, would be a daunting task. (I remember college: "the answers to odd-number problems are in the back. Not all of them are correct.")

But thanks! I've been through several "Pro" MOOCs now, and way too many "Facebook Quizzes", and I'm developing some definite opinions about how to do online quizzes (and how NOT to.)

This "History and Politics" quiz is in the incredibly slow category. That said, it covers a good field. I only got the 5 easy ones right out of 16 questions. It's a little spoilery, but my favorite answer is:

  • Include some people who are not very "nice", who are likely to help with your problem anyway.

ps, your quizzes are really nice West, I never have the patience to write them, but I know if I invested the time, I'd have it to use forever. But I stop being a teacher in about 14 weeks. :expressionless:

Larry's curated test bank is really amazing. Some software that could cull a subset of a database like that could auto-generate different quizzes, with a difficulty level that one could specify. I know the Sapling team did this with a huge collection of chemistry questions. They employed real chemists to fact-check the problems, and of all the commercial tests, I find it to be the most accurate. Nothing galls me more than wrong question/answers in an online resource that my students have to pay for.

By publishing here, Larry opened this up to the largest, most capable collection of Arduino engineers and technicians in this universe.