SlideShare une entreprise Scribd logo
1  sur  2
Télécharger pour lire hors ligne
Arduino Question:
I need an arduino code that does the following:
When a push button switched is released, a timer is started. A hall sensor simulataneously notes
each time a spinning object with a magnet on it passes by and prints out these times. Each time it
does pass by, the time elapsed is recorded. If the object does not pass by for ten seconds,
"DONE" is printed to the window.
Thank You
Solution
#define HALL_SENSOR 2 //macro definition of magnetic and LED pins
#define LED 4
int pirPin = 2;
int counter = 0;
int laststate = HIGH;
void setup()
{
pinsInit();
}
void loop()
{
if(counter <= 10){ //running until for 10 seconds
if(isNearMagnet()){ //checkng near magnet or not
turnOnLED(); //sqithch on indicator
}
counter++;
}
else{
Serial.println("DONE"); //printing DONE to console
}
}

Contenu connexe

Similaire à Arduino Question- I need an arduino code that does the following- When.docx

Countdown Timer Circuit Diagram with 7 Segment Display
Countdown Timer Circuit Diagram with 7 Segment DisplayCountdown Timer Circuit Diagram with 7 Segment Display
Countdown Timer Circuit Diagram with 7 Segment DisplayImran Risal
 
Arduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesArduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesMithi Sevilla
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2DIPAN GHOSH
 
GDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationGDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationMithi Sevilla
 
GreenHouse_v1
GreenHouse_v1GreenHouse_v1
GreenHouse_v1Suraj S
 
Electronz_Chapter_2.pptx
Electronz_Chapter_2.pptxElectronz_Chapter_2.pptx
Electronz_Chapter_2.pptxMokete5
 
Itsp documentation quadcopter flight controller based on kalman filters
Itsp documentation   quadcopter flight controller based on kalman filtersItsp documentation   quadcopter flight controller based on kalman filters
Itsp documentation quadcopter flight controller based on kalman filtersJyotirmaya Mahanta
 
All about ir arduino - cool
All about ir   arduino - coolAll about ir   arduino - cool
All about ir arduino - coolVlada Stoja
 
Project_report_on_Attendance_system
 Project_report_on_Attendance_system Project_report_on_Attendance_system
Project_report_on_Attendance_systemAmi Goswami
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdfJayanthi Kannan MK
 
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2SANTIAGO PABLO ALBERTO
 
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...Year of the X
 
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...Jayanthi Kannan MK
 
Basic arduino sketch example
Basic arduino sketch exampleBasic arduino sketch example
Basic arduino sketch examplemraziff2009
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labAnnamaria Lisotti
 

Similaire à Arduino Question- I need an arduino code that does the following- When.docx (20)

Countdown Timer Circuit Diagram with 7 Segment Display
Countdown Timer Circuit Diagram with 7 Segment DisplayCountdown Timer Circuit Diagram with 7 Segment Display
Countdown Timer Circuit Diagram with 7 Segment Display
 
Arduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch SlidesArduino Boot Camp Pitch Slides
Arduino Boot Camp Pitch Slides
 
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2Bidirectional Visitor Counter with Automatic ON-OFF Switch2
Bidirectional Visitor Counter with Automatic ON-OFF Switch2
 
GDGPH Hack Fair Presentation
GDGPH Hack Fair PresentationGDGPH Hack Fair Presentation
GDGPH Hack Fair Presentation
 
GreenHouse_v1
GreenHouse_v1GreenHouse_v1
GreenHouse_v1
 
Electronz_Chapter_2.pptx
Electronz_Chapter_2.pptxElectronz_Chapter_2.pptx
Electronz_Chapter_2.pptx
 
Itsp documentation quadcopter flight controller based on kalman filters
Itsp documentation   quadcopter flight controller based on kalman filtersItsp documentation   quadcopter flight controller based on kalman filters
Itsp documentation quadcopter flight controller based on kalman filters
 
All about ir arduino - cool
All about ir   arduino - coolAll about ir   arduino - cool
All about ir arduino - cool
 
Project_report_on_Attendance_system
 Project_report_on_Attendance_system Project_report_on_Attendance_system
Project_report_on_Attendance_system
 
publish manual
publish manualpublish manual
publish manual
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2
Arduino: Arduino para dummies 2 edición por Wiley Brand parte 2
 
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
YOTG Munich - Simon Mang - SixReasons - Hardware prototyping – Sketching with...
 
Arduino tutorial A to Z
Arduino tutorial A to ZArduino tutorial A to Z
Arduino tutorial A to Z
 
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
IoT Arduino UNO, RaspberryPi with Python, RaspberryPi Programming using Pytho...
 
Basic arduino sketch example
Basic arduino sketch exampleBasic arduino sketch example
Basic arduino sketch example
 
Arduino: Arduino lcd
Arduino: Arduino lcdArduino: Arduino lcd
Arduino: Arduino lcd
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
Mom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics labMom presentation_monday_arduino in the physics lab
Mom presentation_monday_arduino in the physics lab
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 

Plus de vtuan3

arrange the following elements in order of decreasing first ionization.docx
arrange the following elements in order of decreasing first ionization.docxarrange the following elements in order of decreasing first ionization.docx
arrange the following elements in order of decreasing first ionization.docxvtuan3
 
Arrange the following in order of decreasing reactivity in an SN2 reac.docx
Arrange the following in order of decreasing reactivity in an SN2 reac.docxArrange the following in order of decreasing reactivity in an SN2 reac.docx
Arrange the following in order of decreasing reactivity in an SN2 reac.docxvtuan3
 
Aroldis Chapman- relief pitcher for the New York Yankees baseball team.docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team.docxAroldis Chapman- relief pitcher for the New York Yankees baseball team.docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team.docxvtuan3
 
arrange the following income statement items so they are in te proper.docx
arrange the following income statement items so they are in te proper.docxarrange the following income statement items so they are in te proper.docx
arrange the following income statement items so they are in te proper.docxvtuan3
 
Aroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docxAroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docxvtuan3
 
Arrange the elution sequence of the following compounds by using rever.docx
Arrange the elution sequence of the following compounds by using rever.docxArrange the elution sequence of the following compounds by using rever.docx
Arrange the elution sequence of the following compounds by using rever.docxvtuan3
 
Arrange the following 0-10 M solutions in order of most acidic to most.docx
Arrange the following 0-10 M solutions in order of most acidic to most.docxArrange the following 0-10 M solutions in order of most acidic to most.docx
Arrange the following 0-10 M solutions in order of most acidic to most.docxvtuan3
 
Arrange in order of increasing pH Arrange each group of compounds-ions.docx
Arrange in order of increasing pH Arrange each group of compounds-ions.docxArrange in order of increasing pH Arrange each group of compounds-ions.docx
Arrange in order of increasing pH Arrange each group of compounds-ions.docxvtuan3
 
around it- s have oxygen dot symbol for 0 How many dots does the Lewis.docx
around it- s have oxygen dot symbol for 0 How many dots does the Lewis.docxaround it- s have oxygen dot symbol for 0 How many dots does the Lewis.docx
around it- s have oxygen dot symbol for 0 How many dots does the Lewis.docxvtuan3
 
Arna- Inc- uses the dollar-value LIFO method of computing its inventor.docx
Arna- Inc- uses the dollar-value LIFO method of computing its inventor.docxArna- Inc- uses the dollar-value LIFO method of computing its inventor.docx
Arna- Inc- uses the dollar-value LIFO method of computing its inventor.docxvtuan3
 
Arnold Corporation uses a job order costing system and applies manufac.docx
Arnold Corporation uses a job order costing system and applies manufac.docxArnold Corporation uses a job order costing system and applies manufac.docx
Arnold Corporation uses a job order costing system and applies manufac.docxvtuan3
 
Arizaga Corporation manufactures canoes in two departments- Fabricatio (1).docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio (1).docxArizaga Corporation manufactures canoes in two departments- Fabricatio (1).docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio (1).docxvtuan3
 
Arizaga Corporation manufactures canoes in two departments- Fabricatio.docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio.docxArizaga Corporation manufactures canoes in two departments- Fabricatio.docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio.docxvtuan3
 
Are the physical properties of a substance changed if that substance u.docx
Are the physical properties of a substance changed if that substance u.docxAre the physical properties of a substance changed if that substance u.docx
Are the physical properties of a substance changed if that substance u.docxvtuan3
 
are these binding site are lewis base or lewis acid (10 marks) Two met.docx
are these binding site are lewis base or lewis acid (10 marks) Two met.docxare these binding site are lewis base or lewis acid (10 marks) Two met.docx
are these binding site are lewis base or lewis acid (10 marks) Two met.docxvtuan3
 
Answer ALL PARTS !! A square of an isotropic metallic material havin.docx
Answer ALL PARTS !!   A square of an isotropic metallic material havin.docxAnswer ALL PARTS !!   A square of an isotropic metallic material havin.docx
Answer ALL PARTS !! A square of an isotropic metallic material havin.docxvtuan3
 
are 3 trumpet players- each playing with sound intensity level of 90 d.docx
are 3 trumpet players- each playing with sound intensity level of 90 d.docxare 3 trumpet players- each playing with sound intensity level of 90 d.docx
are 3 trumpet players- each playing with sound intensity level of 90 d.docxvtuan3
 
Approximate the logarithm using the properties of logarithms- given lo.docx
Approximate the logarithm using the properties of logarithms- given lo.docxApproximate the logarithm using the properties of logarithms- given lo.docx
Approximate the logarithm using the properties of logarithms- given lo.docxvtuan3
 
Apply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docx
Apply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docxApply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docx
Apply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docxvtuan3
 
Apply C++ to write and test the following power( ) function that retur.docx
Apply C++ to write and test the following power( ) function that retur.docxApply C++ to write and test the following power( ) function that retur.docx
Apply C++ to write and test the following power( ) function that retur.docxvtuan3
 

Plus de vtuan3 (20)

arrange the following elements in order of decreasing first ionization.docx
arrange the following elements in order of decreasing first ionization.docxarrange the following elements in order of decreasing first ionization.docx
arrange the following elements in order of decreasing first ionization.docx
 
Arrange the following in order of decreasing reactivity in an SN2 reac.docx
Arrange the following in order of decreasing reactivity in an SN2 reac.docxArrange the following in order of decreasing reactivity in an SN2 reac.docx
Arrange the following in order of decreasing reactivity in an SN2 reac.docx
 
Aroldis Chapman- relief pitcher for the New York Yankees baseball team.docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team.docxAroldis Chapman- relief pitcher for the New York Yankees baseball team.docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team.docx
 
arrange the following income statement items so they are in te proper.docx
arrange the following income statement items so they are in te proper.docxarrange the following income statement items so they are in te proper.docx
arrange the following income statement items so they are in te proper.docx
 
Aroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docxAroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docx
Aroldis Chapman- relief pitcher for the New York Yankees baseball team (1).docx
 
Arrange the elution sequence of the following compounds by using rever.docx
Arrange the elution sequence of the following compounds by using rever.docxArrange the elution sequence of the following compounds by using rever.docx
Arrange the elution sequence of the following compounds by using rever.docx
 
Arrange the following 0-10 M solutions in order of most acidic to most.docx
Arrange the following 0-10 M solutions in order of most acidic to most.docxArrange the following 0-10 M solutions in order of most acidic to most.docx
Arrange the following 0-10 M solutions in order of most acidic to most.docx
 
Arrange in order of increasing pH Arrange each group of compounds-ions.docx
Arrange in order of increasing pH Arrange each group of compounds-ions.docxArrange in order of increasing pH Arrange each group of compounds-ions.docx
Arrange in order of increasing pH Arrange each group of compounds-ions.docx
 
around it- s have oxygen dot symbol for 0 How many dots does the Lewis.docx
around it- s have oxygen dot symbol for 0 How many dots does the Lewis.docxaround it- s have oxygen dot symbol for 0 How many dots does the Lewis.docx
around it- s have oxygen dot symbol for 0 How many dots does the Lewis.docx
 
Arna- Inc- uses the dollar-value LIFO method of computing its inventor.docx
Arna- Inc- uses the dollar-value LIFO method of computing its inventor.docxArna- Inc- uses the dollar-value LIFO method of computing its inventor.docx
Arna- Inc- uses the dollar-value LIFO method of computing its inventor.docx
 
Arnold Corporation uses a job order costing system and applies manufac.docx
Arnold Corporation uses a job order costing system and applies manufac.docxArnold Corporation uses a job order costing system and applies manufac.docx
Arnold Corporation uses a job order costing system and applies manufac.docx
 
Arizaga Corporation manufactures canoes in two departments- Fabricatio (1).docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio (1).docxArizaga Corporation manufactures canoes in two departments- Fabricatio (1).docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio (1).docx
 
Arizaga Corporation manufactures canoes in two departments- Fabricatio.docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio.docxArizaga Corporation manufactures canoes in two departments- Fabricatio.docx
Arizaga Corporation manufactures canoes in two departments- Fabricatio.docx
 
Are the physical properties of a substance changed if that substance u.docx
Are the physical properties of a substance changed if that substance u.docxAre the physical properties of a substance changed if that substance u.docx
Are the physical properties of a substance changed if that substance u.docx
 
are these binding site are lewis base or lewis acid (10 marks) Two met.docx
are these binding site are lewis base or lewis acid (10 marks) Two met.docxare these binding site are lewis base or lewis acid (10 marks) Two met.docx
are these binding site are lewis base or lewis acid (10 marks) Two met.docx
 
Answer ALL PARTS !! A square of an isotropic metallic material havin.docx
Answer ALL PARTS !!   A square of an isotropic metallic material havin.docxAnswer ALL PARTS !!   A square of an isotropic metallic material havin.docx
Answer ALL PARTS !! A square of an isotropic metallic material havin.docx
 
are 3 trumpet players- each playing with sound intensity level of 90 d.docx
are 3 trumpet players- each playing with sound intensity level of 90 d.docxare 3 trumpet players- each playing with sound intensity level of 90 d.docx
are 3 trumpet players- each playing with sound intensity level of 90 d.docx
 
Approximate the logarithm using the properties of logarithms- given lo.docx
Approximate the logarithm using the properties of logarithms- given lo.docxApproximate the logarithm using the properties of logarithms- given lo.docx
Approximate the logarithm using the properties of logarithms- given lo.docx
 
Apply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docx
Apply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docxApply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docx
Apply the Skill 04-13 Vitamin D helps the body absorb calcium- iron- m.docx
 
Apply C++ to write and test the following power( ) function that retur.docx
Apply C++ to write and test the following power( ) function that retur.docxApply C++ to write and test the following power( ) function that retur.docx
Apply C++ to write and test the following power( ) function that retur.docx
 

Dernier

Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830Dave Phillips
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and stepobaje godwin sunday
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17Celine George
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfMohonDas
 
NOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdf
NOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdfNOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdf
NOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdfSumit Tiwari
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 

Dernier (20)

Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830Latin American Revolutions, c. 1789-1830
Latin American Revolutions, c. 1789-1830
 
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
General views of Histopathology and step
General views of Histopathology and stepGeneral views of Histopathology and step
General views of Histopathology and step
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17How to Add a many2many Relational Field in Odoo 17
How to Add a many2many Relational Field in Odoo 17
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
Diploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdfDiploma in Nursing Admission Test Question Solution 2023.pdf
Diploma in Nursing Admission Test Question Solution 2023.pdf
 
NOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdf
NOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdfNOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdf
NOTES OF DRUGS ACTING ON NERVOUS SYSTEM .pdf
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdfPersonal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 

Arduino Question- I need an arduino code that does the following- When.docx

  • 1. Arduino Question: I need an arduino code that does the following: When a push button switched is released, a timer is started. A hall sensor simulataneously notes each time a spinning object with a magnet on it passes by and prints out these times. Each time it does pass by, the time elapsed is recorded. If the object does not pass by for ten seconds, "DONE" is printed to the window. Thank You Solution #define HALL_SENSOR 2 //macro definition of magnetic and LED pins #define LED 4 int pirPin = 2; int counter = 0; int laststate = HIGH; void setup() { pinsInit(); } void loop() { if(counter <= 10){ //running until for 10 seconds if(isNearMagnet()){ //checkng near magnet or not turnOnLED(); //sqithch on indicator } counter++; } else{ Serial.println("DONE"); //printing DONE to console
  • 2. } }