element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Quiz Test your Knowledge of Arduino Fundamentals: Part I: Quiz
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 16 Feb 2020 5:22 AM Date Created
  • Last Updated Last Updated: 6 Jun 2024 4:57 PM
  • Views 30652 views
  • Likes 20 likes
  • Comments 215 comments
Related
Recommended

Test your Knowledge of Arduino Fundamentals: Part I: Quiz

Arduino Fundamentals I

Arduino Fundamentals I
Complete our Arduino Fundamentals I quiz , like the document, and leave your feedback as a...

Are you ready to demonstrate your Arduino knowledge? Then take this 25-question quiz to test your knowledge of Arduino and see how ready you are for Arduino Certification.

To earn the Arduino Fundamentals I Badge, attain 100% on the quiz, leave us some feedback in the comments section, and give the quiz a star rating.

 

Profile

Quiz | Arduino Day 2021  | Workshop | Digital Fever  | Attack of the Drones | Project14 |Arduino Tutorials | Arduino Projects | Resource | Arduino Homepage image

  • e14quiz
  • featured_arduino
  • arduino fundamentals: part i: quiz
  • arduino fundamentals
  • quiz
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply

Top Comments

  • beacon_dave
    beacon_dave over 6 years ago +11
    Question 24 depends on whether or not you are 'sinking' or 'sourcing' the LED which has been connected...
  • tariq.ahmad
    tariq.ahmad over 6 years ago +10
    There's no one way to do #13 so in hindsight it wasn't the best question. We've made a tweak to the quiz to reflect this and how people actually code. We thank everyone who took this quiz early and brought…
  • BigG
    BigG over 6 years ago +8
    Hmmm, not so sure about question 13 as you can create code such that either can apply "Place code in _____ to make an LED flash 10 times."
  • WestfW
    WestfW over 5 years ago

    Question 24 (connect an LED on pin 13) - correct answer actually depends on the details of how the LED is connected.

    It looks to me like question 3 has two correct answers.

    Question 7  (delay(10000)) is poorly worded, IMO.  The "result" is a delay, not just "some number of seconds" (what happens to the new seconds?  Do they get added to the time till the heat death of the universe?  Or maybe to the lifetime of the programmer?)


    I sort of felt that there were a bunch of questions here that tested things that an Arduino user doesn't really need to know.  (instruction pipeline!?)  I've always been a bit hesitant to take the "certification" test, even thought I'm theoretically an experienced C and AVR programmer (I did get 100% on THIS), since I was worried that it would veer away from general engineering into things that were closer to what Arduino users actually do (that I haven't done.)  Like "Multiple I2C sensors can be connected to the same i2C bus as a long as...", or "The following interfaces are commonly used to connect an LCD display to an Arduino..."

    Also... very AVR-centric.  I guess that matches usage statistics, but...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • pavan555
    pavan555 over 5 years ago

    Nice quiz to boost our knowledge.5 stars rating

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 5 years ago in reply to javagoza

    I suspect, long before your gold sticker there was parental pride.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 5 years ago in reply to javagoza

    javagoza   Thanks!

    ~~Cris

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • javagoza
    javagoza over 5 years ago in reply to phoenixcomm

    For the banded lines:

    1. Select the code to highlight
    2. Then use de Insert button [>>] menu / Syntax Highlighting / c++

    image

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 5 years ago in reply to javagoza

    javagoza Enrique, this may sound dumb, but how do you get this stupid editor to give you the banded lines????

    and you are quite right about the second form but I did not include it as I did not think they would get it.

    in C there is no square primitive ie number2 The easy way is with a define.

    #define SQUARE(x)  ((x)*(x))

    another good candidate is Pi

    #define pi 3.14159265359

     

    ~~Cris

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • javagoza
    javagoza over 5 years ago in reply to colporteur

    colporteur lol, mom and dad are going to be proud of me.

    Thanks for the sticker and for your personal and detailed road tests.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • colporteur
    colporteur over 5 years ago in reply to javagoza

    image

    Thanks for taking the time to prepare such a detailed write-up. It answered my question and then some. Like in school I felt you deserved a sticker for your efforts.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • javagoza
    javagoza over 5 years ago in reply to colporteur

    A macro is a piece of code that has been given a name. Whenever the name is used, it is replaced by the content of the macro. For example if you define a macro

     

    #define HEIGHT 15

     

    When you press the compile button and before the compilation starts, the C preprocessor acts. The preprocessor will take care of all the #define instructions it finds.

     

    When the preprocessor finds the name HEIGHT, it will replace it with 15, it is basically a search and replace to which we can also send parameters to be able to make a conditional substitution.

     

    There are two types of macros. They mostly differ in how they look when used. Macros of type object resemble data objects when used, macros of type function resemble function calls.

     

    In this case ISR(TIMER1_OVF_vect) is a function like macro that will be replaced by the preprocessor according the defines in interrupt.h. To use it you must tell the preprocessor to include that file

     

    #include <avr/interrupt.h>

     

    In that file you can see what is going to happen when the preprocessor finds ISR() macro:

     

    #ifdef __cplusplus
    #  define ISR(vector, ...)            \
        extern "C" void vector (void) __attribute__ ((signal,__INTR_ATTRS)) __VA_ARGS__; \
        void vector (void)
    #else
    …

     

    This define also uses more macros, even TIMER1_OVF_vect is another macro.

     

    So, ISR (TIMER1_OVF_vect) is just a helper that we use so that the preprocessor writes for us everything necessary so that the compiler knows that a routine associated with a given interrupt vector is being written.

     

    But what is an ISR?

     

    The interrupt service routine (ISR) is the software module that is executed when the hardware requests an interrupt.

     

    An interrupt is an event that indicates the CPU to take immediate action. You can also see an interrupt as the automatic transfer of software execution in response to a hardware event that is asynchronous with the current software execution. Your program is running, but suddenly an event occurs in the hardware that demands the attention of the processor.

     

    This hardware event is called a trigger. The hardware event can be a transition from busy to ready on an external I / O device (such as the UART input / output) or an internal event (such as bus failure, memory failure, or a periodic timer). When the hardware needs service, which means a transition from busy to ready, it will request an interrupt by setting its wake-up flag.

     

    A thread is defined as the path of action of the software while it is running. The execution of the interrupt service routine is called a background thread. This thread is created by the hardware interrupt request and is killed when the interrupt service routine returns from the interrupt. A new thread is created for each interrupt request.

     

    In the example, a subroutine is defined that is associated with the interrupt vector of a counter overflow. This counter is triggered by clock cycles at a frequency determined by the current clock frequency and a selected divider.

     

    When the counter overflows it generates an interrupt, at that moment the processor passes control to the piece of code pointed to by the interrupt vector, it points to the address where the code is.

    • Cancel
    • Vote Up +7 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 5 years ago

    genebren Gene, you can only have a good programming style which is an art in itself.

    for instance in my normal program.

    program xyz.c or xyz.pde

    #incllude <pins.h>  //#define pinName  pin Number  or int pinName = 30,

    #Include <modes.h>  // pinMode( pinName, INPUT_PULLUP );

    void setup() { }  /is only for assingments like i=0, or things that are run once ie. bitSet(TCCR1B, CS12);  // 256 prescaler  NEVER LOOPS!! unless you are Initalizing an arry buy I might just put the array in a .pde file and include it.

     

    now Loop() is the other bag of worms how do you exit the loop so if you had this code:

    void loop() {

    int i =0;

    int iMax = 100;

    for i = 0 ; I < 100; I++){

    print i; }}

     

    what would do?? yop count 0 -100 forever. there is no control mechanism to leave the loop. such as

    int main() {

    do {

    somethine

    } while (n == TRUE);

    retrun( erroNum()); }

    }

     

    and every function.c should have a function.h  in this way you choose what to expose to the world.

    That's why I do my Arduino programming in C on Eclipse IDE.

    ~~Cris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube