This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * damper_position_calculation.c | |
| * | |
| * Created: 23.03.2016 14:56:20 | |
| * Author: Daniel | |
| */ | |
| #include "../../Data_transmission/data_transmission.h" | |
| #include "damper_position_calculation.h" | |
| #include "../../AtmegaSetup/atmega_setups.h" | |
| #include "../../ADC1118/ads1118.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdbool.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * ltc6804.c | |
| * | |
| * Created: 25.12.2015 17:15:23 | |
| * Author: Mikael-pc | |
| */ | |
| #include "ltc6804.h" | |
| #include "ltc6804_definitions.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum ltc6804_RegisterGroup | |
| { | |
| RegisterGroup_CONFIG, | |
| RegisterGroup_CELLA, | |
| RegisterGroup_CELLB, | |
| RegisterGroup_CELLC, | |
| RegisterGroup_CELLD, | |
| ReigsterGroup_AUXA, | |
| RegisterGroup_AUXB, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // New interface | |
| enum RegisterGroup { CONFIG, CELLA, CELLB, CELLC, AUXA, AUXB, STATA, STATB }; | |
| struct configRegisterStruct | |
| { | |
| bool refon; | |
| bool adcModeOpt; | |
| uint16_t underVoltageMonitoringEnable_bm; | |
| uint16_t overVoltageMonitoringEnable_bm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int main(void) | |
| { | |
| LED_1_init(); | |
| LED_2_init(); | |
| LED_3_init(); | |
| atmega_init(); | |
| cli(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from socket import * | |
| s = socket(AF_INET, SOCK_DGRAM) | |
| s.sendto("hello",("78.91.11.26",60770)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from multiprocessing.managers import BaseManager | |
| class QueueManager(BaseManager): pass | |
| QueueManager.register('get_queue') | |
| m = QueueManager(address=('78.91.11.26', 50000), authkey='lol') | |
| m.connect() | |
| queue = m.get_queue() | |
| while True: | |
| i = raw_input("write GET or WRITE") | |
| if i.lower() == "write": | |
| text = raw_input("text: ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from multiprocessing.managers import BaseManager | |
| class QueueManager(BaseManager): pass | |
| QueueManager.register('get_queue') | |
| m = QueueManager(address=('78.91.11.26', 50000), authkey='lol') | |
| m.connect() | |
| queue = m.get_queue() | |
| queue.put('hello') | |
| queue.put("yes") | |
| print(queue.qsize()) | |
| print(queue.get(1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * ADC version 1.0.c | |
| * | |
| * Created: 23.01.2016 21:02:13 | |
| * Author : Daniel | |
| */ | |
| #include <avr/io.h> | |
| #include <ctype.h> | |
| #include "SPI.h" |