Productive
This commit is contained in:
		
							parent
							
								
									37146109fd
								
							
						
					
					
						commit
						cc44a4021b
					
				| @ -61,12 +61,14 @@ static uint8_t node_id PROGMEM= { NODE_ID }; | ||||
| static OW_switch_t switches[N_SWITCHES] PROGMEM={ | ||||
| //  nick, addr[8], event_tag[sw1, sw2]
 | ||||
|  { 201, { 0x12, 0x5b, 0x27, 0x50, 0x0, 0x0, 0x0, 0x26 }, { 2, 1 } }, | ||||
|  { 202, { 0x12, 0xF7, 0x95, 0x4F, 0x0, 0x0, 0x0, 0x69 }, { 3, 4 } }, | ||||
|  { 203, { 0x12, 0x68, 0x31, 0x67, 0x0, 0x0, 0x0, 0xBC }, { 5, 6 } }, | ||||
| // { 202, { 0x12, 0xF7, 0x95, 0x4F, 0x0, 0x0, 0x0, 0x69 }, { 3, 4 } },
 | ||||
| // { 203, { 0x12, 0x68, 0x31, 0x67, 0x0, 0x0, 0x0, 0xBC }, { 5, 6 } },
 | ||||
|  { 204, { 0x12, 0x5E, 0xFF, 0x55, 0x0, 0x0, 0x0, 0x2C }, { 7, 8 } }, | ||||
|  { 205, { 0x12, 0x7B, 0x44, 0x4D, 0x0, 0x0, 0x0, 0x6A }, { 1, 2 } }, | ||||
|  { 205, { 0x12, 0x7B, 0x44, 0x4D, 0x0, 0x0, 0x0, 0x6A }, { 4, 7 } }, | ||||
|  { 101, { 0x12, 0xC1, 0x4E, 0x67, 0x0, 0x0, 0x0, 0x74 }, { 7, 7 } }, | ||||
|  { 102, { 0x12, 0xA9, 0x97, 0x4F, 0x0, 0x0, 0x0, 0xD7 }, { 9, 0 } }, | ||||
|  { 102, { 0x12, 0xA9, 0x97, 0x4F, 0x0, 0x0, 0x0, 0xD7 }, { 9, 3 } }, | ||||
|  { 11, { 0x12, 0x9A, 0x94, 0x4F, 0x0, 0x0, 0x0, 0x2D }, { 9, 6 } }, | ||||
|  { 12, { 0x12, 0x2F, 0x98, 0x4F, 0x0, 0x0, 0x0, 0xE0 }, { 8, 8 } }, | ||||
|  { 0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 }, { 0, 0 } } | ||||
| }; | ||||
| static uint8_t switches_state[N_SWITCHES]; | ||||
| @ -74,12 +76,12 @@ static outputs_t outputs[N_OUTPUTS] PROGMEM={ | ||||
| 
 | ||||
|   { GPIO, 0},   // 0 Bad Decke
 | ||||
|   { GPIO, 1},   // 1  Bad Spiegel
 | ||||
|   { GPIO, 23},  // 2
 | ||||
|   { GPIO, 23},  // 2 Inka
 | ||||
|   { GPIO, 22},  // 3
 | ||||
|   { GPIO, 17},  // 4 Flur
 | ||||
|   { GPIO, 16},  // 5
 | ||||
|   { GPIO, 17},  // 4
 | ||||
|   { GPIO, 16},  // 5 Bjarne
 | ||||
|   { GPIO, 9},   // 6 Treppe oben
 | ||||
|   { GPIO, 10}, | ||||
|   { GPIO, 10},  // 7 Schlafzimmer
 | ||||
|   { NOP, 0xFF} | ||||
| }; | ||||
| static uint8_t outputs_state[N_OUTPUTS]; | ||||
| @ -289,6 +291,7 @@ void setup(void) | ||||
|   // outputs
 | ||||
|   for (size_t i = 0; outputs[i].type != NOP; i++) { | ||||
|     if (outputs[i].type == GPIO || outputs[i].type == PWM){ | ||||
|       digitalWrite(outputs[i].address, HIGH); | ||||
|       pinMode(outputs[i].address, OUTPUT); | ||||
|     } | ||||
|   } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user