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
ORG 00H ; Assembly Starts from 0000H. | |
; Main Program | |
START: MOV P1, #0XFF ; Move 11111111 to PORT1. | |
CALL WAIT ; Call WAIT | |
MOV A, P1 ; Move P1 value to ACC | |
CPL A ; Complement ACC | |
MOV P1, A ; Move ACC value to P1 | |
CALL WAIT ; Call WAIT | |
SJMP START ; Jump to START | |
WAIT: MOV R2, #10 ; Load Register R2 with 10 (0x0A) |
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
if (TARGET tinyusb_device) | |
add_executable(hello_usb | |
hello_usb.c | |
) | |
# Pull in our pico_stdlib which aggregates commonly used features | |
target_link_libraries(hello_usb pico_stdlib) | |
# enable usb output, disable uart output | |
pico_enable_stdio_usb(hello_usb 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
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x3F, 16, 2); | |
void setup() | |
{ | |
lcd.init(); | |
lcd.backlight(); | |
lcd.setCursor(0,0); |
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 RPi.GPIO as GPIO | |
import time | |
s2 = 23 | |
s3 = 24 | |
signal = 25 | |
NUM_CYCLES = 10 |
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 <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define SCREEN_WIDTH 128 | |
#define SCREEN_HEIGHT 64 | |
#define OLED_MOSI 13 | |
#define OLED_CLK 14 |
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
const int watermeterPin = 2; | |
volatile int pulse_frequency; | |
unsigned int literperhour; | |
unsigned long currentTime, loopTime; | |
byte sensorInterrupt = 0; | |
void setup() | |
{ | |
pinMode(watermeterPin, INPUT); |
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<reg51.h> | |
#define led P0 | |
sbit sw1=P2^0; | |
sbit sw2=P2^1; | |
sbit sw3=P2^2; | |
sbit sw4=P2^3; | |
unsigned char ch[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; | |
//void delay (int); | |
void display (unsigned long int); | |
void sdelay (char); |
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 rec=2; | |
int play=3; | |
int sensor=4; | |
int led=13; | |
void setup() | |
{ | |
pinMode(rec,OUTPUT); | |
pinMode(play,OUTPUT); | |
pinMode(led,OUTPUT); |
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<reg51.h> | |
#define lcd P3 | |
#define dat P2 | |
sbit rs=P1^6; | |
sbit e=P1^7; | |
void delay (int); | |
void display (unsigned char); | |
void cmd (unsigned char); |
NewerOlder