Go Down

Topic: Training and testing for new users. (Read 5863 times) previous topic - next topic

larryd

#15
Aug 28, 2018, 01:23 am Last Edit: Aug 28, 2018, 01:26 am by larryd
Typo, now corrected.

What's a Mac ;)
Changed:   Ctrl+T, Cmd+T,
No technical PMs.
The last thing you did is where you should start looking.

westfw

Quote
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...)

GolamMostafa

#17
Aug 30, 2018, 05:36 pm Last Edit: Aug 30, 2018, 06:19 pm by GolamMostafa
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?


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.

GolamMostafa

#18
Aug 30, 2018, 08:43 pm Last Edit: Aug 30, 2018, 09:06 pm by GolamMostafa
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.

lastchancename

#19
Aug 30, 2018, 10:47 pm Last Edit: Aug 31, 2018, 06:02 am by lastchancename
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...!
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.

westfw

#20
Aug 31, 2018, 01:13 am Last Edit: Aug 31, 2018, 01:16 am by westfw
Quote
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"


westfw

Quote
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.)

larryd

#22
Aug 31, 2018, 02:11 am Last Edit: Aug 31, 2018, 02:35 am by larryd
@westfw   looks very good.

A step up from beige on white.  ;)

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





No technical PMs.
The last thing you did is where you should start looking.

ChrisTenone

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.)
Atmosphere carries combustion vapors to places where they will do good instead of harm - Mike Faraday's 'History of a Candle': https://www.youtube.com/watch?v=6W0MHZ4jb4A

Whoops ::)

ChrisTenone

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.
Atmosphere carries combustion vapors to places where they will do good instead of harm - Mike Faraday's 'History of a Candle': https://www.youtube.com/watch?v=6W0MHZ4jb4A

Whoops ::)

westfw

Quote
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" :-)
(and I submitted a "suggestion."  And another one for the "license" issue.)

westfw

Quote
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.

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 !  :-[
Experienced responders have a nose for laziness, (they were beginners once)... expecting the poster to contribute to the learning experience.

ChrisTenone

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!
Atmosphere carries combustion vapors to places where they will do good instead of harm - Mike Faraday's 'History of a Candle': https://www.youtube.com/watch?v=6W0MHZ4jb4A

Whoops ::)

ChrisTenone

...What's a Mac ;)
...
:o It's a type of PC that runs Unix instead of DOS.
Atmosphere carries combustion vapors to places where they will do good instead of harm - Mike Faraday's 'History of a Candle': https://www.youtube.com/watch?v=6W0MHZ4jb4A

Whoops ::)

Go Up