Arduino trafic light
ฉันอยู่ที่โรงเรียนและครูของฉันบอกให้ฉันทำสัญญาณไฟจราจร
รายละเอียดทางเทคนิคเพิ่มเติม
การจำลองตรรกะในเมือง
โปรเจกต์พื้นฐานในการออกแบบ state-machine ที่จำลองพฤติกรรมมาตรฐานของสี่แยกในเมือง
- State-Machine Logic: โค้ดหลีกเลี่ยงการใช้ฟังก์ชัน
delay() โดยใช้โครงสร้าง switch/case ที่จัดการด้วย millis() แทน สิ่งนี้ช่วยให้มีปุ่ม "Pedestrian Crossing" (ทางม้าลาย) ที่สามารถขัดจังหวะรอบสัญญาณไฟได้ทันที
- Programmable Timing: มี "Night Mode" (โหมดกลางคืน) ที่สัญญาณไฟจะเปลี่ยนเป็นการกระพริบ Yellow/Red แสดงให้เห็นว่าระบบจราจรอัจฉริยะปรับตัวเข้ากับความหนาแน่นของการจราจรอย่างไร
ฮาร์ดแวร์ภาพ
- Standardized Signaling: ใช้ LED ความสว่างสูงขนาด 10mm เฟิร์มแวร์มีตรรกะ "Clearance Interval" (ไฟแดงทั้งหมด) เพื่อจำลองโปรโตคอลความปลอดภัยในโลกจริง
ข้อมูล Frontmatter ดั้งเดิม
title: "Arduino trafic light"
description: "With this proyect you can do thre ledes work a a team."
author: "Sebasop12"
category: ""
tags:
- "cars"
views: 2166
likes: 1
price: 435
difficulty: "Easy"
components:
- "1x Perma-Proto Breadboard Half Size"
- "1x 5 mm LED: Green"
- "1x 5 mm LED: Yellow"
- "1x Arduino UNO"
- "1x Jumper wires (generic)"
- "1x paperboard"
- "1x toothpick"
- "1x Hot glue gun (generic)"
- "1x 5 mm LED: Red"
tools: []
apps:
- "1x Arduino IDE"
downloadableFiles:
- "https://create.arduino.cc/editor/Sebasop12/e07f93e3-e033-40aa-9fb5-5ee00f90acf8"
- "https://create.arduino.cc/editor/Sebasop12/e07f93e3-e033-40aa-9fb5-5ee00f90acf8"
documentationLinks: []
passwordHash: "8a569e1c12716b67badda19a5ec248128c7a44a004dff69fb8c1579cedd390c8"
encryptedPayload: "U2FsdGVkX18o03Z5rvxaUvKGFSpbUHLvpHwdT9A8RNzx3a/JzeT/pcDRfaIvldkMP3v6fDpwB3/IqUtUgd8lmsPejFMWHbFA2iT8GiH+a+A="
seoDescription: "Create a simple Arduino Traffic Light using 3 LEDs. A perfect starter project for anyone interested in Arduino programming."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/arduino-trafic-light-a6ddad_cover.jpg"
lang: "th"