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
SPI комуникација (прием на податоци од SLAVE -> MASTER): | |
- Master-от секогаш го контролира клокот. | |
- После успешно подесување на SPI хардверот, slave уредот секогаш ја вметнува секвенцата SPIRDY = 0x55 во SPDR (Serial Peripheral Data Register). | |
- Master-от прво ја праќа саканата команда (8-bit), потоа гледа дали пристигнатиот бајт е SPIRDY. Ова сигнализира дека SPI хардверот на слејвот е иницијализиран и подготвен за праќање на податоци. | |
- После успешно примен SPIRDY, master-от повторно иницијализира комуникација, со што slave-от треба да прати 8-bit-на вредност, што ја кажува должината на податоците што следат. |
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
#define SSID "KIKA" | |
#define PASS "sz123456" | |
void setup() { | |
pinMode(13, OUTPUT); | |
digitalWrite(13, LOW); | |
delay(1000); | |
Serial.begin(115200); |
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
; Семинарска по предметот микропроцесорска електроника | |
BITS 16 ; Ќе работиме во реален мод, 16 битни регистри. | |
JMP short POCETOK ; Скокни ги следните дефиниции, тие се потребни само за FAT12 filesystem-от | |
NOP ; NOP пред FAT12 информациите | |
; Следат информации и дефиниции потребни за FAT12 filesystem-от | |
; Ова не е машински код, и треба да се прескокни | |
; Подесувањата подолу се однесуваат на 1.44 MB, 3.5" floppy дискета |
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 <OneWire.h> | |
#include <LiquidCrystal.h> | |
#include <avr/delay.h> | |
#define CHANGERATE 5 // in which limits will the temperature change since the last reading, in degrees | |
#define INPUTPIN 5 | |
// For every sensor found it outputs to serial: | |
// SensorID,CurrentTemp,Readout time,Current time | |
// Info at: http://wiki.spodeli.org/Хаклаб/Температура |
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> | |
float B(float I) { | |
float B=0; | |
float u0 = 0.000001256; | |
float C = 0.71554; | |
B = u0 * C * (132/0.1475) * I; | |
return B; | |
} |
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
import serial | |
import sys | |
import urllib2 | |
import json | |
S = serial.Serial("/dev/ttyUSB0") | |
lst = [] | |
S.flushInput() | |
T = S.readline() |
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 <Wire.h> | |
#define DEV_ID 0x90 >> 1 // shift required by wire.h | |
void setup() | |
{ | |
Serial.begin(9600); | |
Wire.begin(); |
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 <iostream> | |
#include <cstring> | |
#include <sstream> | |
using namespace std; | |
class Telefon { | |
private: | |
int godproiz; | |
int pocetnacena; |
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 <unistd.h> | |
#include <sys/io.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <signal.h> |