This file contains 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
/** | |
* \file main.cpp | |
* \brief Program demonstrujący działanie drzewa uporządkowanego (binarnego) | |
* \author Rafał Wileczek (na podstawie podręcznika do informatyki rozszerzonej) | |
* \version 1.0 | |
* \date 2018 | |
* | |
* Program jest modyfikacją przykładu z podręcznika do informatyki rozszerzonej – zamiast | |
* liczb całkowitych porządkowane są napisy (ciągi znaków) | |
* |
This file contains 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 <cstdlib> | |
using namespace std; | |
// Struktura przechowująca węzeł drzewa | |
struct SWezel | |
{ | |
int dane; | |
SWezel *lewySyn; |
This file contains 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> | |
using namespace std; | |
// Lista jednokierunkowa – najprostsza struktura dynamiczna | |
// Program demonstrujący kilka prostych operacji na liście | |
// jednokierunkowej | |
// Definicja typu strukturalnego jako elementu listy | |
struct element { |
This file contains 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
$regfile = "attiny2313.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
Config Portb = Output | |
Portb = &B11111111 | |
Config Portd = &B1111100 | |
Portd = &B1111111 |
This file contains 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
$regfile = "attiny2313.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
Const Zero = &B11000000 | |
Const Jeden = &B11111001 | |
Const Dwa = &B10100100 | |
Const Trzy = &B10110000 |
This file contains 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
' Nieskomplikowany miernik częstotliwości z ręczną i automatyczną zmianą zakresu (Hz, kHz), | |
' oraz z funkcją licznika impulsów. | |
' Obsługa: | |
' 1) Wyświetlacz pokazuje odczyt częstotliwości sygnału lub liczbę impulsów | |
' 2) Przyciski "Funkcja" i "Zakres" pozwalają na - odpowiednio - zmianę funkcji urządzenia (miernik częstotliwości lub | |
' licznik impulsów/zdarzeń) oraz zmianę zakresu dla mierzonych częstotliwości (Hz, kHz) dla wartośi F<=8MHz. | |
' Wersja oprogramowania 1.0 |
This file contains 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 <PJON.h> // Receiver board code | |
#include <Timer.h> | |
PJON network(12, 44); // Bus connection to pin 12, device id 44 | |
Timer t; | |
int timer_id = 0; | |
void setup() { | |
pinMode(13, OUTPUT); | |
digitalWrite(13, LOW); |
This file contains 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
void setup() { | |
pinMode(13, OUTPUT); | |
digitalWrite(13, LOW); | |
Serial.begin(9600); | |
} | |
#define SAMPLE_LED 100 | |
#define SAMPLE_SERIAL 1000 |
This file contains 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
void setup() { | |
pinMode(13, OUTPUT); | |
digitalWrite(13, LOW); | |
} | |
#define SAMPLE 10 | |
unsigned long int poprzednio = millis() - SAMPLE; | |
byte stan = LOW; |
This file contains 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
$regfile = "attiny2313.dat" | |
$crystal = 4000000 | |
$hwstack = 40 | |
$swstack = 16 | |
$framesize = 32 | |
Const Podstawa_licznika = 65536 | |
Config Portd.6 = Output | |
' Zwrotnica zamknięta: |