Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2024:vstoica:rardu_marian.leanca [2024/05/27 03:27]
radu_marian.leanca [Concluzii]
pm:prj2024:vstoica:rardu_marian.leanca [2024/05/27 17:18] (current)
radu_marian.leanca [Download]
Line 174: Line 174:
   myDFPlayer.volume(30); ​ // Set volume value (0~30).   myDFPlayer.volume(30); ​ // Set volume value (0~30).
  
-  // Set pin modes +  // Set pin modes using direct register manipulation 
-  ​pinMode(trigPin, OUTPUT); +  ​DDRB |= (1 << DDB1); // pumpPin (PB1/Pin 9) 
-  ​pinMode(echoPin, INPUT); +  ​DDRD |= (1 << DDD7); // waterSensorPower (PD7/Pin 7) 
-  ​pinMode(waterSensorPower,​ OUTPUT); +  ​DDRD |= (1 << DDD6); // soilMoisturePower (PD6/Pin 6) 
-  ​pinMode(soilMoisturePower,​ OUTPUT); +  ​DDRB |= (1 << DDB0); // trigPin (PB0/Pin 8) 
-  ​pinMode(pumpPin, OUTPUT);+  ​DDRB &= ~(1 << DDB1); // echoPin (PB1/Pin 9)
   analogWrite(pumpPin,​ 0);   analogWrite(pumpPin,​ 0);
 } }
Line 230: Line 230:
 void measureDistance() { void measureDistance() {
   // Clear the trigPin   // Clear the trigPin
-  ​digitalWrite(trigPin, LOW);+  ​PORTB &= ~(1 << PORTB0);
   delayMicroseconds(2);​   delayMicroseconds(2);​
  
   // Set the trigPin high for 10 microseconds   // Set the trigPin high for 10 microseconds
-  ​digitalWrite(trigPin, HIGH);+  ​PORTB |= (1 << PORTB0);
   delayMicroseconds(10);​   delayMicroseconds(10);​
-  ​digitalWrite(trigPin, LOW);+  ​PORTB &= ~(1 << PORTB0);
  
   // Read the echoPin and calculate the duration of the pulse   // Read the echoPin and calculate the duration of the pulse
Line 247: Line 247:
 void measureWaterLevel() { void measureWaterLevel() {
   // Power on the water level sensor   // Power on the water level sensor
-  ​digitalWrite(waterSensorPower,​ HIGH);+  ​PORTD |= (1 << PORTD7);
   delay(10);   delay(10);
  
Line 253: Line 253:
  
   // Power off the water level sensor   // Power off the water level sensor
-  ​digitalWrite(waterSensorPower,​ LOW);+  ​PORTD &= ~(1 << PORTD7);
 } }
  
 void measureSoilMoisture() { void measureSoilMoisture() {
   // Power on the soil moisture sensor   // Power on the soil moisture sensor
-  ​digitalWrite(soilMoisturePower,​ HIGH);+  ​PORTD |= (1 << PORTD6);
   delay(10);   delay(10);
  
Line 264: Line 264:
  
   // Power off the soil moisture sensor   // Power off the soil moisture sensor
-  ​digitalWrite(soilMoisturePower,​ LOW);+  ​PORTD &= ~(1 << PORTD6);
 } }
- 
  
 </​code>​ </​code>​
Line 283: Line 282:
 ===== Download ===== ===== Download =====
  
-<note warning>​ +{{:pm:prj2024:vstoica:sswp_reg.zip|}}
-O arhivă (sau mai multe dacă este cazul) cu fişierele obţinute în urma realizării proiectului:​ surse, scheme, etc. Un fişier README, un ChangeLog, un script de compilare şi copiere automată pe uC crează întotdeauna o impresie bună ;-). +
- +
-Fişierele se încarcă pe wiki folosind facilitatea **Add Images or other files**. Namespace-ul în care se încarcă fişierele este de tipul **:pm:prj20??:c?** sau **:pm:​prj20??:​c?:​nume_student** (dacă este cazul). **Exemplu:​** Dumitru Alin, 331CC -> **:​pm:​prj2009:​cc:​dumitru_alin**. +
-</​note>​ +
- +
-===== Jurnal ===== +
- +
-<note tip> +
-Puteți avea și o secțiune de jurnal în care să poată urmări asistentul de proiect progresul proiectului. +
-</​note>​ +
 ===== Bibliografie/​Resurse ===== ===== Bibliografie/​Resurse =====
 +  * Resurse Hardware:
 +    * [[https://​www.thingiverse.com/​thing:​3537287|fișiere 3D]]
  
-<​note>​ +  ​* Resurse Software
-Listă cu documente, datasheet-uri,​ resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**. +    ​[[https://​projecthub.arduino.cc/Isaac100/​getting-started-with-the-hc-sr04-ultrasonic-sensor-7cabe1|Senzor ultrasunet]] 
-</note> +    * [[https://​www.instructables.com/​How-to-use-a-Water-Level-Sensor-Arduino-Tutorial/|Senzor nivel apă]] 
- +    * [[https://​www.dfrobot.com/​product-599.html|Senzor sol]] 
-<​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</a></html> +    * [[https://​wiki.dfrobot.com/​DFPlayer_Mini_SKU_DFR0299|DFPlayer Mini]]
pm/prj2024/vstoica/rardu_marian.leanca.1716769665.txt.gz · Last modified: 2024/05/27 03:27 by radu_marian.leanca
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0