a.binder 5 lat temu
rodzic
commit
92bd509035

+ 1 - 2
SE/schema/WPS_Functions/automation_driven/build.automation_driven.PRODUCT.xml

@@ -75,8 +75,7 @@
              location="${automation_driven.repository}/automation_driven.module"/>
    
    <include file="build.automation_driven.PRODUCT.submodule.xml"/>
-   
-   
+   <include file="build.automation_driven.PRODUCT.raspberry.xml"/>
    
    
    

+ 37 - 6
SE/stuff/P5_Automation_can-dev-res-working-1930/___SUBMODULES___/radio_tx/radio_tx.ino

@@ -14,12 +14,43 @@
 #include "printf.h"
 #include "RF24.h"
 
-#define RF24_ce_pin 10
-#define RF24_csn_pin 11 
+//0x35 duze
+//#define RF24_ce_pin 8 //53 //8 //7
+//#define RF24_csn_pin 9 //48 //9//10 
+
+//0x36 male
+//#define RF24_ce_pin 7 //8 //7
+//#define RF24_csn_pin 10 //9//10 
+
+//0x41 pilot
+
+//#define RF24_ce_pin 8 //53 //8 //7
+//#define RF24_csn_pin 9 //48 //9//10 
+
+
+//auto
+#define RF24_ce_pin 34 //8 //53 //8 //7
+#define RF24_csn_pin 36 // 9 //48 //9//10 
+
+
+/*
+ * See documentation at https://nRF24.github.io/RF24
+ * See License information at root directory of this library
+ * Author: Brendan Doherty (2bndy5)
+ */
+
+/**
+ * A simple example of sending data from 1 nRF24L01 transceiver to another.
+ *
+ * This example was written to be used on 2 devices acting as "nodes".
+ * Use the Serial Monitor to change each node's behavior.
+ */
+#include <SPI.h>
+#include "printf.h"
+#include "RF24.h"
 
 // instantiate an object for the nRF24L01 transceiver
-//RF24 radio(RF24_ce_pin, RF24_csn_pin); // using pin 7 for the CE pin, and pin 8 for the CSN pin
-RF24 radio(10, 11); // using pin 7 for the CE pin, and pin 8 for the CSN pin
+RF24 radio( RF24_ce_pin, RF24_csn_pin); // using pin 7 for the CE pin, and pin 8 for the CSN pin
 
 // Let these addresses be used for the pair
 uint8_t address[][6] = {"1Node", "2Node"};
@@ -31,7 +62,7 @@ uint8_t address[][6] = {"1Node", "2Node"};
 bool radioNumber = 1; // 0 uses address[0] to transmit, 1 uses address[1] to transmit
 
 // Used to control whether this node is sending or receiving
-bool role = true ;//false;  // true = TX role, false = RX role
+bool role = false;  // true = TX role, false = RX role
 
 // For this example, we'll be using a payload containing
 // a single float number that will be incremented
@@ -155,4 +186,4 @@ void loop() {
     }
   }
 
-} // loop
+} // loop

+ 19 - 3
SE/stuff/p5_neuron/p5_neuron.ino

@@ -24,7 +24,9 @@ Servo myservo;
 #include "config_Active_ControllerID.h"
 #include "config_Slave_Ports_LOCAL_config.h" //lite
 
-
+#if defined(HAS_RF24)
+    #include "RF24_config.h"
+#endif
      
         
 #if ! defined(TFT_ILI9163C_DCpin)
@@ -287,12 +289,13 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     #endif
     
     
+   
      #if defined(HAS_TFT_HX8357) || defined(HAS_TFT_ILI9163C)
      //   DISPLAY_DEV.setRotation(2);
         DISPLAY_DEV.fillScreen(BLACK);//DISPLAY_DEV.clearScreen();
         DISPLAY_DEV.setCursor(0,0);
     
-   #endif
+      #endif
 
         
         #if defined(HAS__PCINT_setup)
@@ -311,7 +314,12 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     pinMode(AnalogSensorRC_PIN, INPUT_PULLUP); 
     pinMode(AnalogSensorRR_PIN, INPUT_PULLUP);
  */
+ 
+ 
     TASK_TYPE_T_Get_Ports_Status_INPUT_A___SETUP();
+    
+     
+    
     #if defined(PWM_Servo_PIN)
         myservo.attach(PWM_Servo_PIN); 
         myservo.write(90);
@@ -327,9 +335,14 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     #endif
     
     #if defined(HAS_BH1750)
-         Wire.begin();
+          Wire.begin();
+    #endif
+    
+    #if defined(HAS_RF24)
+        #include "RF24_setup.h"
     #endif
     
+    
   //  pinMode(11, OUTPUT);
   //  pinMode(13, OUTPUT);
   //  pinMode(3, OUTPUT);
@@ -383,6 +396,9 @@ void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     HCSR04_input();
    #endif
   
+    #if defined(HAS_RF24) and HAS_RF24 == 1
+        #include "RF24_RX_loop.h"
+    #endif
     neuron_PORT_to_NEURON();