{"id":714,"date":"2021-03-24T12:11:43","date_gmt":"2021-03-24T12:11:43","guid":{"rendered":"https:\/\/starthardware.org\/en\/?p=714"},"modified":"2021-03-26T22:25:28","modified_gmt":"2021-03-26T22:25:28","slug":"raylfx-forestry-module","status":"publish","type":"post","link":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/","title":{"rendered":"RaylFX \u2013 Forestry Module"},"content":{"rendered":"\n<p>This module of the <a href=\"https:\/\/starthardware.org\/en\/raylfx-effects-for-model-railroads-and-model-making-with-arduino-nano\/\" target=\"_blank\" rel=\"noreferrer noopener\">RaylFX system<\/a> is inspired by the falling tree set from NOCH, for which I had received a request. So here is a whole deployment site right away. It has the following functions:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A falling tree<\/li><li>Cargo crane (left, right, pick up, dump)<\/li><li>Three pairs of flashing warning lights<\/li><li>Vehicle lighting<\/li><li>Job site lighting<\/li><\/ul>\n\n\n\n<p>Since it is not possible to use the DFPlayer sound module with servo motors at the same time, there is unfortunately no sound output on this module. However, the independent RaylFX sound module (currently in work) can be used for this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wiring Diagram<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"537\" src=\"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-model-railway-falling-tree-forestry-module-servo-wiring-diagram-1024x537.jpg\" alt=\"RaylFX Arduino Falling Tree Servo Forestry Module Wiring Diagram\" class=\"wp-image-721\" srcset=\"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-model-railway-falling-tree-forestry-module-servo-wiring-diagram-1024x537.jpg 1024w, https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-model-railway-falling-tree-forestry-module-servo-wiring-diagram-300x157.jpg 300w, https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-model-railway-falling-tree-forestry-module-servo-wiring-diagram-768x403.jpg 768w, https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-model-railway-falling-tree-forestry-module-servo-wiring-diagram.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>D10: Servo \u00bbfalling tree\u00ab<\/li><li>D11: cargo crane servo rotation<\/li><li>D12: cargo crane servo winch<\/li><li>D2 \u2013 D7: LEDs for flashing lights<\/li><li>D8, D9: vehicle lighting<\/li><li>A1 \u2013 A3: job site lighting (the analog inputs are used as digital outputs)\u00a0<\/li><\/ul>\n\n\n\n<p>Attention: The control signal of the <a href=\"https:\/\/starthardware.org\/en\/raylfx-effects-for-model-railroads-and-model-making-with-arduino-nano\/\" target=\"_blank\" rel=\"noreferrer noopener\">RaylFX control module<\/a> is applied to pin A4. It controls the time of day and is mandatory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Components<\/h2>\n\n\n\n<ul class=\"wp-block-list\" id=\"block-aa2bb72e-36ad-4f02-bf4d-f009a13b9d29\"><li><a href=\"https:\/\/amzn.to\/2MCr0Yc\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino Nano<\/a>*<\/li><li><a href=\"https:\/\/amzn.to\/36nY4KH\" target=\"_blank\" rel=\"noreferrer noopener\">Breadboard and jumper wires<\/a>*<\/li><li><a href=\"https:\/\/amzn.to\/2PJdwvx\" target=\"_blank\" rel=\"noreferrer noopener\">LED-Set<\/a>*<\/li><li><a href=\"https:\/\/amzn.to\/3cf4pui\" target=\"_blank\" rel=\"noreferrer noopener\">Servo-Set<\/a>*<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Code Settings<\/h2>\n\n\n\n<p>This module also offers a number of adjustment options. Firstly, all target states of the servos should be set. There are two states for each of the three servos, e.g. <em>treeDown <\/em>and <em>treeUp<\/em>. These are the degrees to which the servo should adjust.<\/p>\n\n\n\n<p>It should be noted that the range should be between 0 and 180, although servos often can not reach these extreme values. Therefore, these limits must be tested. I suggest to approach these limits carefully, e.g. 30 &#8211; 150, 20 &#8211; 160 \u2026<\/p>\n\n\n\n<p>Furthermore, <em>treeDown <\/em>must be larger than <em>treeUp<\/em>, <em>craneRight <\/em>must be larger than <em>craneLeft<\/em>, and <em>winchUp <\/em>must be larger than <em>winchDown<\/em>.<\/p>\n\n\n\n<p>The falling tree is triggered at random. The smaller the variable <em>fallingTreeRandom <\/em>is, the more often the tree falls.<\/p>\n\n\n\n<p>The cargo crane performs an animation that is time-controlled. The duration of the individual phases can be determined via the array craneTimeouts. Here the times are set in milliseconds (1000ms=1s). The animation has the following phases:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Hold (Probability)<\/li><li>Pick up<\/li><li>Hold<\/li><li>Rotate<\/li><li>Hold<\/li><li>Dump<\/li><li>Warten (Probability)<\/li><li>Pick up<\/li><li>Hold<\/li><li>Rotate<\/li><li>Hold<\/li><li>Dump<\/li><\/ul>\n\n\n\n<p>Position 0 and 6 (the first position in the array is always 0) define a probability with which the crane continues to work: the higher, the less often the next animation phase is executed. This creates a more random operating pattern.<\/p>\n\n\n\n<p>The rotation speed of the two crane servos (winch and rotation) can be set via the variables <em>craneWinchSpeed <\/em>and <em>craneRotationSpeed<\/em>. The larger the value, the slower the servos move.<\/p>\n\n\n\n<p>There are three pairs of warning lights that flash at different rates. The frequency can be set via the array <em>warningLightsTimer<\/em>. A slight variance in the frequency creates a more realistic flashing pattern.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int treeDown = 120;               \/\/ servo position of the lying tree\r\nint treeUp = 30;                  \/\/ servo position of the standing tree\r\n\r\nlong fallingTreeRandom = 200000;  \/\/ the smaller the value, the more often the tree falls\r\n\r\n\/* Sets the waiting times of the crane sequence:\r\n   hold (probability), pick up, hold, rotate, hold, dump, hold (probability), pick up, hold, rotate, hold, dump\r\n   -> position 0 and 6 set a probability, with which the crane continues to work: the higher, the rarer\r\n*\/\r\nint craneTimeouts&#091;] = {1000, 3000, 1000, 3000, 1000, 3000, 1000, 3000, 1000, 3000, 1000, 3000};\r\n\r\nint craneWinchSpeed = 10;         \/\/ speed of the crane winch (greater = slower)\r\nint craneRotationSpeed = 10;      \/\/ speed of the crane rotation (greater = slower)\r\nint winchUp = 120;                \/\/ servo position of the raised crane winch\r\nint winchDown = 60;               \/\/ servo position of the lowerd crane winch\r\nint craneRight = 160;             \/\/ servo position of the crane boom right\r\nint craneLeft = 30;               \/\/ servo position of the crane boom left\r\n\r\nint warningLightsTimer&#091;3] = {800, 700, 650}; \/\/ warning lights flashing frequency<\/code><\/pre>\n\n\n\n<p>When uploading you have to make sure that the correct board is selected in the Arduino menu. To do this, &#8220;ATmega328P (Old Bootlaoder)&#8221; must also be selected in the Processor subitem of the Tools menu.<\/p>\n\n\n\n<p>The following program code can be easily copied with the above mentioned changes and loaded onto the Arduino nano.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Code for the RaylFX Forestry Module<\/h2>\n\n\n\n<pre class=\"wp-block-code lang-arduino\"><code>\/*\r\n    Rayl-FX Forestry Module\r\n    StartHardware.org\/en\r\n\r\n    Permalink: https:\/\/starthardware.org\/en\/raylfx-forestry-module\/\r\n*\/\r\n\r\n#include &lt;Servo.h>\r\n\r\n\/* ***** ***** Settings ***** ***** ***** *****  ***** ***** ***** *****  ***** ***** ***** ***** *\/\r\n\r\nint treeDown = 120;               \/\/ servo position of the lying tree\r\nint treeUp = 30;                  \/\/ servo position of the standing tree\r\n\r\nlong fallingTreeRandom = 200000;  \/\/ the smaller the value, the more often the tree falls\r\n\r\n\/* Sets the waiting times of the crane sequence:\r\n   hold (probability), pick up, hold, rotate, hold, dump, hold (probability), pick up, hold, rotate, hold, dump\r\n   -> position 0 and 6 set a probability, with which the crane continues to work: the higher, the rarer\r\n*\/\r\nint craneTimeouts&#091;] = {1000, 3000, 1000, 3000, 1000, 3000, 1000, 3000, 1000, 3000, 1000, 3000};\r\n\r\nint craneWinchSpeed = 10;         \/\/ speed of the crane winch (greater = slower)\r\nint craneRotationSpeed = 10;      \/\/ speed of the crane rotation (greater = slower)\r\nint winchUp = 120;                \/\/ servo position of the raised crane winch\r\nint winchDown = 60;               \/\/ servo position of the lowerd crane winch\r\nint craneRight = 160;             \/\/ servo position of the crane boom right\r\nint craneLeft = 30;               \/\/ servo position of the crane boom left\r\n\r\nint warningLightsTimer&#091;3] = {800, 700, 650}; \/\/ warning lights flashing frequency\r\n\r\n\/* ***** ***** From here begins the program code, which does not need to be adjusted ***** ***** ***** ***** *\/\r\n\r\nint warningLightPins&#091;6] = {2, 3, 4, 5, 6, 7};   \/\/ warning light pins\r\nint vehicleLightingPins&#091;2] = {8, 9};            \/\/ pins of the vehicle lighting\r\nint jobSiteLightingPins&#091;3] = {15, 16, 17};      \/\/ this pin connects to the job site lighting\r\nint treeServoPin = 10;\r\nint craneServoPin = 11;\r\nint winchServoPin = 12;\r\n\r\n\r\n\/* State Variables *\/\r\nint treeStatus = 0;                             \/\/ 0 = nothing, 1 = falls, 2 = lies, 3 = raise\r\nint craneStatus = 0;\r\n\r\n\/* Memory Variables *\/\r\nint treePosition;\r\nint winchPosition;\r\nint cranePosition;\r\n\r\n\/* Timer Variables *\/\r\nlong craneTimer;\r\nlong treeTimer;\r\nlong craneRotationTimer;\r\nlong craneWinchTimer;\r\n\r\n\r\nint treeTimeout = 100;\r\nint treeTimeoutMax = 100;\r\n\r\n\/* Create Objects *\/\r\nServo treeServo;\r\nServo craneServo;\r\nServo winchServo;\r\n\r\n\/* Variables from the control module to determine the time of day *\/\r\nboolean receive = false;\r\nboolean receiveStarted = false;\r\nint receiveTimeout = 10;\r\nlong receiveTimer = 0;\r\nint receivedTime = 0;\r\nint receivePulse = 0;\r\nint lastReceivePulse = 0;\r\nint receivePin = 18;\r\nint myTime = 0;\r\n\r\n#define PAYLOAD_SIZE 2                          \/\/ mandatory for communication with master-module\r\nint timeOfDay = 0;                              \/\/ stores timeOfDay of master-module (0 and 255)\r\nbyte nodePayload&#091;PAYLOAD_SIZE];                 \/\/ temporarily stores data of master-module\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);                         \/\/ starts the serial communication\r\n\r\n  for (int i = 0; i &lt; 3; i++) {                 \/\/ for the number of job site lighting pins\r\n    pinMode(jobSiteLightingPins&#091;i], OUTPUT);    \/\/ declare the pin as output\r\n    digitalWrite(jobSiteLightingPins&#091;i], HIGH); \/\/ turn off the LED at this pin\r\n  }\r\n\r\n  for (int i = 0; i &lt; 2; i++) {                 \/\/ for the number of vehicle lighting pins\r\n    pinMode(vehicleLightingPins&#091;i], OUTPUT);    \/\/ declare the pin as output\r\n    digitalWrite(vehicleLightingPins&#091;i], HIGH); \/\/ turn off the LED at this pin\r\n  }\r\n\r\n  for (int i = 0; i &lt; 6; i++) {                 \/\/ for the number of warning light pins\r\n    pinMode(warningLightPins&#091;i], OUTPUT);       \/\/ declare the pin as output\r\n    digitalWrite(warningLightPins&#091;i], HIGH);    \/\/ turn off the LED at this pin\r\n  }\r\n\r\n  treeServo.attach(treeServoPin);\r\n  craneServo.attach(craneServoPin);\r\n  winchServo.attach(winchServoPin);\r\n}\r\n\r\nvoid loop() {\r\n  receiveFunction();                \/\/ execute instructions for reception\r\n  myTime = 21;\r\n\r\n  if (receiveStarted == false) {    \/\/ if no data is currently being received:\r\n    \r\n    if (myTime > 22) {              \/\/ ***** late evening *****\r\n      warningLightOn();             \/\/ turn on warning lights\r\n      jobSiteLightingOn();          \/\/ turn on job site lighting\r\n      vehicleLightingOn();          \/\/ turn on vehicle lighting\r\n      treeOn();                     \/\/ turn on falling tree\r\n      craneOn();                    \/\/ turn on crane rotation\r\n      \r\n    } else if (myTime > 18) {       \/\/ ***** evening *****\r\n      warningLightOn();             \/\/ turn on warning lights\r\n      jobSiteLightingOn();          \/\/ turn on job site lighting\r\n      vehicleLightingOn();          \/\/ turn on vehicle lighting\r\n      treeOn();                     \/\/ turn on falling tree\r\n      craneOn();                    \/\/ turn on crane rotation\r\n      \r\n    } else if (myTime > 12) {       \/\/ ***** noon *****\r\n      warningLightOn();             \/\/ turn on warning lights\r\n      jobSiteLightingOff();         \/\/ turn off job site lighting\r\n      vehicleLightingOff();         \/\/ turn off vehicle lighting\r\n      treeOn();                     \/\/ turn on falling tree\r\n      craneOn();                    \/\/ turn on crane rotation\r\n      \r\n    } else if (myTime > 9) {        \/\/ ***** forenoon *****\r\n      warningLightOn();             \/\/ turn on warning lights\r\n      jobSiteLightingOff();         \/\/ turn off job site lighting\r\n      vehicleLightingOff();         \/\/ turn off vehicle lighting\r\n      treeOn();                     \/\/ turn on falling tree\r\n      craneOn();                    \/\/ turn on crane rotation\r\n      \r\n    } else if (myTime > 7) {        \/\/ ***** morning *****\r\n      warningLightOn();             \/\/ turn on warning lights\r\n      jobSiteLightingOff();         \/\/ turn off job site lighting\r\n      vehicleLightingOff();         \/\/ turn off vehicle lighting\r\n      treeOn();                     \/\/ turn on falling tree\r\n      craneOn();                    \/\/ turn on crane rotation\r\n      \r\n    } else {                        \/\/ ***** night *****\r\n      warningLightOff();            \/\/ turn on warning lights\r\n      jobSiteLightingOff();         \/\/ turn on job site lighting\r\n      vehicleLightingOn();          \/\/ turn on vehicle lighting\r\n      treeOff();                    \/\/ turn off falling tree\r\n    }\r\n  }\r\n}\r\n\r\nvoid vehicleLightingOn() {\r\n  digitalWrite(vehicleLightingPins&#091;0], LOW);\r\n  digitalWrite(vehicleLightingPins&#091;1], LOW);\r\n}\r\n\r\nvoid vehicleLightingOff() {\r\n  digitalWrite(vehicleLightingPins&#091;0], HIGH);\r\n  digitalWrite(vehicleLightingPins&#091;1], HIGH);\r\n}\r\n\r\nvoid jobSiteLightingOn() {\r\n  if (random(2000) &lt;= 1) digitalWrite(jobSiteLightingPins&#091;0], LOW);\r\n  if (random(2000) &lt;= 1) digitalWrite(jobSiteLightingPins&#091;1], LOW);\r\n  if (random(2000) &lt;= 1) digitalWrite(jobSiteLightingPins&#091;2], LOW);\r\n}\r\n\r\nvoid jobSiteLightingOff() {\r\n  for (int i = 0; i &lt; 3; i++) {\r\n    digitalWrite(jobSiteLightingPins&#091;i], HIGH);\r\n  }\r\n}\r\n\r\nvoid warningLightOn() {\r\n  for (int i = 0; i &lt; 4; i++) {\r\n    if (millis() % warningLightsTimer&#091;i] &lt; warningLightsTimer&#091;i] \/ 2) {\r\n      digitalWrite(warningLightPins&#091;i * 2], HIGH);\r\n      digitalWrite(warningLightPins&#091;i * 2 + 1], LOW);\r\n    } else {\r\n      digitalWrite(warningLightPins&#091;i * 2], LOW);\r\n      digitalWrite(warningLightPins&#091;i * 2 + 1], HIGH);\r\n    }\r\n  }\r\n}\r\n\r\nvoid warningLightOff() {\r\n  for (int i = 0; i &lt; 8; i++) {\r\n    digitalWrite(warningLightPins&#091;i], HIGH);\r\n  }\r\n}\r\n\r\nvoid craneOn() {\r\n  if ((craneStatus != 0) || (craneStatus != 6)) {\r\n    if (craneTimer + craneTimeouts&#091;craneStatus] &lt; millis()) {\r\n      craneStatus++;\r\n      if (craneStatus > 11) craneStatus = 0;\r\n      craneTimer = millis();\r\n      Serial.print(\"cranestatus=\"); Serial.println(craneStatus);\r\n    }\r\n  }\r\n\r\n  switch (craneStatus) {\r\n    case 0: \/\/ hold\r\n      if (random(craneTimeouts&#091;0]) &lt; 1) craneStatus = 1;\r\n      break;\r\n    case 1:  \/\/ pick up\r\n      if (craneWinchTimer + craneWinchSpeed &lt; millis()) {\r\n        if (winchPosition &lt; winchUp) {\r\n          winchPosition++;\r\n          winchServo.write(winchPosition);\r\n        }\r\n        craneWinchTimer = millis();\r\n      }\r\n      break;\r\n    case 2:  \/\/ hold\r\n      break;\r\n    case 3:  \/\/ rotate\r\n      if (craneRotationTimer + craneRotationSpeed &lt; millis()) {\r\n        if (cranePosition &lt; craneRight) {\r\n          cranePosition++;\r\n          craneServo.write(cranePosition);\r\n        }\r\n        craneRotationTimer = millis();\r\n      }\r\n      break;\r\n    case 4:  \/\/ hold\r\n      break;\r\n    case 5:  \/\/ dump\r\n      if (craneWinchTimer + craneWinchSpeed &lt; millis()) {\r\n        if (winchPosition > winchDown) {\r\n          winchPosition--;\r\n          winchServo.write(winchPosition);\r\n        }\r\n        craneWinchTimer = millis();\r\n      }\r\n      break;\r\n    case 6:  \/\/ hold\r\n      if (random(craneTimeouts&#091;6]) &lt; 1) craneStatus = 7;\r\n      break;\r\n    case 7:  \/\/ pick up\r\n      if (craneWinchTimer + craneWinchSpeed &lt; millis()) {\r\n        if (winchPosition &lt; winchUp) {\r\n          winchPosition++;\r\n          winchServo.write(winchPosition);\r\n        }\r\n        craneWinchTimer = millis();\r\n      }\r\n\r\n      break;\r\n    case 8:  \/\/ hold\r\n      break;\r\n    case 9:  \/\/ rotate\r\n      if (craneRotationTimer + craneRotationSpeed &lt; millis()) {\r\n        if (cranePosition > craneLeft) {\r\n          cranePosition--;\r\n          craneServo.write(cranePosition);\r\n        }\r\n        craneRotationTimer = millis();\r\n      }\r\n      break;\r\n    case 10: \/\/ hold\r\n      break;\r\n    case 11: \/\/ dump\r\n      if (craneWinchTimer + craneWinchSpeed &lt; millis()) {\r\n        if (winchPosition > winchDown) {\r\n          winchPosition--;\r\n          winchServo.write(winchPosition);\r\n        }\r\n        craneWinchTimer = millis();\r\n      }\r\n      break;\r\n  }\r\n\r\n}\r\n\r\nvoid treeOn() {\r\n  switch (treeStatus) {\r\n    case 0:\r\n      if (treeTimer + treeTimeout &lt; millis()) {\r\n        if (random(fallingTreeRandom) &lt; 1) {\r\n          treeStatus = 1;\r\n          treeTimeout = treeTimeoutMax;\r\n        }\r\n      }\r\n      break;\r\n    case 1:\r\n      if (treeTimer + treeTimeout &lt; millis()) {\r\n        if (treePosition &lt; treeDown) {\r\n          treePosition++;\r\n          treeTimeout -= 2;\r\n          treeServo.write(treePosition);\r\n        } else {\r\n          treeTimeout = 10000;\r\n          treeStatus = 2;\r\n        }\r\n        delay(1);\r\n        treeTimer = millis();\r\n      }\r\n\r\n      break;\r\n    case 2:\r\n      if (treeTimer + treeTimeout &lt; millis()) {\r\n        treeStatus = 3;\r\n        treeTimeout = treeTimeoutMax;\r\n      }\r\n      break;\r\n    case 3:\r\n      if (treeTimer + treeTimeout &lt; millis()) {\r\n        if (treePosition > treeUp) {\r\n          treePosition--;\r\n          treeServo.write(treePosition);\r\n        } else {\r\n          treeTimeout = 1000;\r\n          treeStatus = 0;\r\n        }\r\n        delay(1);\r\n        treeTimer = millis();\r\n      }\r\n      break;\r\n  }\r\n  \/**\/\r\n}\r\n\r\nvoid treeOff() {\r\n  if (treePosition > treeUp) {\r\n    if (treeTimer + treeTimeout &lt; millis()) {\r\n      treePosition--;\r\n      treeServo.write(treePosition);\r\n    }\r\n  }\r\n}\r\n\r\n\/* ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** ***** *\/\r\n\r\nvoid receiveFunction() {                      \/\/ receives time of day from control-module\r\n  receivePulse = digitalRead(receivePin);     \/\/ read out the receive pin\r\n  \r\n  if ((receiveTimer + receiveTimeout &lt; millis()) &amp;&amp; (receiveStarted == true)) {\r\n    \/\/ on timeout and active reception\r\n    receiveStarted = false;                   \/\/ end active reception\r\n    myTime = receivedTime - 1;                \/\/ store received time\r\n    receivedTime = 0;                         \/\/ reset the auxiliary variable for time reception\r\n    Serial.println(myTime);                   \/\/ serial output\r\n  }\r\n  \/\/ if a pulse is detected at the receive pin that was not there before\r\n  if ((receivePulse == 0) &amp;&amp; (lastReceivePulse == 1)) {\r\n    receiveTimer = millis();                  \/\/ restart timer\r\n    if (receiveStarted == false) receiveStarted = true;  \/\/ start active reception, if not already done\r\n    receivedTime++;                           \/\/ there was a pulse, so increase the auxiliary variable to receive time\r\n  }\r\n  lastReceivePulse = receivePulse;            \/\/ remember current state at pin for next pass\r\n}<\/code><\/pre>\n\n\n<ul class=\"wp-block-latest-posts__list is-grid columns-3 wp-block-latest-posts\"><\/ul>\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-primary\"><a class=\"wp-block-button__link\" href=\"https:\/\/starthardware.org\/en\/category\/projects\/arduino-projects\/raylfx\/\" target=\"_blank\" rel=\"noreferrer noopener\">View all RaylFX modules \u00bb<\/a><\/div>\n<\/div>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>This module of the RaylFX system is inspired by the falling tree set from NOCH, for which I had received a request. So here is a whole deployment site right away. It has the following functions: A falling tree Cargo crane (left, right, pick up, dump) Three pairs of flashing warning lights Vehicle lighting Job&hellip;&nbsp;<a href=\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">RaylFX \u2013 Forestry Module<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":716,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[5,9],"tags":[],"class_list":["post-714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino-projects","category-raylfx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RaylFX \u2013 Forestry Module<\/title>\n<meta name=\"description\" content=\"RaylFX \u2013 Here you will learn how to build a forestry work site with Arduino: falling tree, loading crane and flashing light.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RaylFX \u2013 Forestry Module\" \/>\n<meta property=\"og:description\" content=\"RaylFX \u2013 Here you will learn how to build a forestry work site with Arduino: falling tree, loading crane and flashing light.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/\" \/>\n<meta property=\"og:site_name\" content=\"StartHardware - Tutorials for Arduino\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-24T12:11:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-26T22:25:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-forestry-falling-tree-lumberjack-lumber-jack-1-1024x576-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Hermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/starthardware.org\/en\/#website\",\"url\":\"https:\/\/starthardware.org\/en\/\",\"name\":\"StartHardware - Tutorials for Arduino\",\"description\":\"Arduino, Electronics, Fun\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/starthardware.org\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-forestry-falling-tree-lumberjack-lumber-jack-1-1024x576-1.jpg\",\"contentUrl\":\"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-forestry-falling-tree-lumberjack-lumber-jack-1-1024x576-1.jpg\",\"width\":1024,\"height\":576,\"caption\":\"RaylFX Forestry Arduino Model Railway Servo Falling Tree\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#webpage\",\"url\":\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/\",\"name\":\"RaylFX \u2013 Forestry Module\",\"isPartOf\":{\"@id\":\"https:\/\/starthardware.org\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#primaryimage\"},\"datePublished\":\"2021-03-24T12:11:43+00:00\",\"dateModified\":\"2021-03-26T22:25:28+00:00\",\"author\":{\"@id\":\"https:\/\/starthardware.org\/en\/#\/schema\/person\/37dd49804e351d0045589790d695d99c\"},\"description\":\"RaylFX \u2013 Here you will learn how to build a forestry work site with Arduino: falling tree, loading crane and flashing light.\",\"breadcrumb\":{\"@id\":\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/starthardware.org\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RaylFX \u2013 Forestry Module\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/starthardware.org\/en\/#\/schema\/person\/37dd49804e351d0045589790d695d99c\",\"name\":\"David Hermann\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/starthardware.org\/en\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c1f55f9c9addf2633dc5513f65e57c6b11de8c1d05cab7a65be1e402233d543?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5c1f55f9c9addf2633dc5513f65e57c6b11de8c1d05cab7a65be1e402233d543?s=96&d=mm&r=g\",\"caption\":\"David Hermann\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RaylFX \u2013 Forestry Module","description":"RaylFX \u2013 Here you will learn how to build a forestry work site with Arduino: falling tree, loading crane and flashing light.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/","og_locale":"en_US","og_type":"article","og_title":"RaylFX \u2013 Forestry Module","og_description":"RaylFX \u2013 Here you will learn how to build a forestry work site with Arduino: falling tree, loading crane and flashing light.","og_url":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/","og_site_name":"StartHardware - Tutorials for Arduino","article_published_time":"2021-03-24T12:11:43+00:00","article_modified_time":"2021-03-26T22:25:28+00:00","og_image":[{"width":1024,"height":576,"url":"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-forestry-falling-tree-lumberjack-lumber-jack-1-1024x576-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"David Hermann","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/starthardware.org\/en\/#website","url":"https:\/\/starthardware.org\/en\/","name":"StartHardware - Tutorials for Arduino","description":"Arduino, Electronics, Fun","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/starthardware.org\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#primaryimage","inLanguage":"en-US","url":"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-forestry-falling-tree-lumberjack-lumber-jack-1-1024x576-1.jpg","contentUrl":"https:\/\/starthardware.org\/en\/wp-content\/uploads\/2021\/03\/raylfx-arduino-forestry-falling-tree-lumberjack-lumber-jack-1-1024x576-1.jpg","width":1024,"height":576,"caption":"RaylFX Forestry Arduino Model Railway Servo Falling Tree"},{"@type":"WebPage","@id":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#webpage","url":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/","name":"RaylFX \u2013 Forestry Module","isPartOf":{"@id":"https:\/\/starthardware.org\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#primaryimage"},"datePublished":"2021-03-24T12:11:43+00:00","dateModified":"2021-03-26T22:25:28+00:00","author":{"@id":"https:\/\/starthardware.org\/en\/#\/schema\/person\/37dd49804e351d0045589790d695d99c"},"description":"RaylFX \u2013 Here you will learn how to build a forestry work site with Arduino: falling tree, loading crane and flashing light.","breadcrumb":{"@id":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/starthardware.org\/en\/raylfx-forestry-module\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/starthardware.org\/en\/raylfx-forestry-module\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/starthardware.org\/en\/"},{"@type":"ListItem","position":2,"name":"RaylFX \u2013 Forestry Module"}]},{"@type":"Person","@id":"https:\/\/starthardware.org\/en\/#\/schema\/person\/37dd49804e351d0045589790d695d99c","name":"David Hermann","image":{"@type":"ImageObject","@id":"https:\/\/starthardware.org\/en\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/5c1f55f9c9addf2633dc5513f65e57c6b11de8c1d05cab7a65be1e402233d543?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c1f55f9c9addf2633dc5513f65e57c6b11de8c1d05cab7a65be1e402233d543?s=96&d=mm&r=g","caption":"David Hermann"}}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/posts\/714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/comments?post=714"}],"version-history":[{"count":16,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/posts\/714\/revisions"}],"predecessor-version":[{"id":745,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/posts\/714\/revisions\/745"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/media\/716"}],"wp:attachment":[{"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/media?parent=714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/categories?post=714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/starthardware.org\/en\/wp-json\/wp\/v2\/tags?post=714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}