archive-ca.com » CA » D » DIGITALCAVE.CA

Total: 28

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • The Digital Cave - DVD Backup and Archiving
    cash if you have no friends able or willing to do an rsync exchange with you Thus this page deals with offline read only archival copies The most common and cheapest form of offline storage is of course burnable CDs or DVDs While these would appear to be the perfect answer to your storage needs some problems with burnable DVDs make it slightly less appealing The largest problem in my opinion is that the dye which makes the disks recordable tends to degrade over time In some conditions you can expect a DVD to be unreadable in a few years This of course makes it impossible to rely on them for your long term storage needs A partial solution to this is Par2 Par2 allows you to create parity archives which allow you to create files with redundant data which can help you recover information from partially corrupted DVDs What I do is burn a DVD with whatever files I want I then copy it to disk using dd and create a 100 parity archive against the disk image I then burn this archive to another DVD To recover a partially corrupted DVD you must first save an image of the corrupted disk you can then restore the image from the parity archive and re burn or just mount the disk image Commands You can make disk images using dd if a disk is corrupted you can use the following options dd if dev hda2 of tmp disk iso bs 4m conv noerror sync Of course change if to your disk drive and of to the file you want to create To create a par2 archive with 100 redundancy use the following command par2 c r100 par2 disk iso You must then burn the resulting par2 files to another DVD

    Original URL path: http://digitalcave.ca/resources/computer/dvd-backup.jsp (2014-10-09)
    Open archived version from archive


  • The Digital Cave - Command Line Cheat Sheet
    DVD Backup Archiving Command Line Cheat Sheet Misc Scripts AVR Arduino Arduino I2C AVR Programming Nikon CLS Flash Trigger AVR Libraries PSX Controller Driver Hardware Misc Circuits Serial Links Security My PGP Keys Photography Katzeye Review Extension Tubes Review Sigma 30 1 4 Review Sigma 50 1 4 Review Sigma 50 150 2 8 Review EXIF Stats Workflow Tools Search Contact Me Command Line Cheat Sheet Command Line Email With

    Original URL path: http://digitalcave.ca/resources/computer/command-line.jsp (2014-10-09)
    Open archived version from archive

  • The Digital Cave - Misc. Scripts
    to get it to run under Windows XP using variations of rsync and ssh although due to a lack of a real cron style scheduler in Windows XP Home it had to be launched manually which quite reduced its usefulness This script must be customized for each installation I have avoided using a separate configuration file as I find that this approach works fine Feel free to change this if you wish You can download the script from here and put it where desired usr local bin or equivalent To configure the script you should do the following Set the program location for rsync and ensure that all requirements e g ssh are isntalled If you are on a decent platform this should be as simple as apt get install rsync or the equivalent Add backup locations LOC1 LOC2 etc as desired Each location will copy a given folder from one machine to another whether client to server or server to client Add the LOCX variables to the loop in the order they should be executed in Fan Monitor This script runs in the background and monitors temperatures from lm sensors and adjusts fan speed accordingly This is useful for machines such as the Macbook Pro whose firmware does not scale fan speed quickly enough This package includes the actual runnable script a configuration file with sane defaults for Apple laptops easily adjustable for others and an init script To install extract the package to such that fanmonitor goes to usr local sbin fanmonitor conf goes to etc and the init script fanmonitor goes to etc init d On Debian systems run update rc d fanmonitor defaults to install it to run at startup You can download the installation package here Download CBC Radio 2 Concerts on Demand CBC Radio

    Original URL path: http://digitalcave.ca/resources/computer/misc-scripts.jsp (2014-10-09)
    Open archived version from archive



  • The Digital Cave - Arduino I2C Sketches
    pin 10 and ground On the slave connect an LED with a resistor to digital pin 9 include Wire h define BUTTON 10 define ADDRESS 42 void setup Serial begin 112500 start serial for output pinMode BUTTON INPUT digitalWrite BUTTON HIGH Wire begin boolean last state HIGH void loop if digitalRead BUTTON last state last state digitalRead BUTTON Serial println Start Wire beginTransmission ADDRESS Serial println Beginning transmission Wire send last state Serial println Sent Data Wire endTransmission Serial println Ended transmission Download i2c master pde Sample I2C implementation Sends a button state over I2C to a slave Arduino with an LED flashing showing button state Connections Arduino analog pins 4 and 5 are connected between the two Arduinos with a 1k pullup resistor connected to each line On the Master connect a push button between digital pin 10 and ground On the slave connect an LED with a resistor to digital pin 9 include Wire h define LED OUT 9 define ADDRESS 42 void setup pinMode LED OUT OUTPUT digitalWrite LED OUT LOW Serial begin 112500 Wire begin ADDRESS Wire onReceive receiveEvent void loop void receiveEvent int howMany while Wire available 0 boolean b Wire receive Serial print b DEC digitalWrite LED OUT b Serial println Download i2c slave pde Multi Master The I2C protocol is a multi master protocol however the Wire library in the Arduino distribution does not make it clear on how to implement this functionality The board setup is very similar to the above Master Slave except that each board has a button and an LED attached to it When you push the button on one the LED on the other should light up It turns out that the Wire library which comes with the Arduino IDE is perfectly capable of doing this unfortunately the

    Original URL path: http://digitalcave.ca/resources/avr/arduino-i2c.jsp (2014-10-09)
    Open archived version from archive

  • The Digital Cave - AVR Programming
    subset of the stk500 programmer While using the Arduino IDE is nice for many scenarios sometimes you just want to be able to upload a file directly Well as it turns out this is quite easy First you will need to use the avrdude which is bundled with Arduino I don t know if they have modified it or if that particular version just plays nicer with the bootloader but whatever the case it seems to just work Next you will use the following command to upload your program avrdude V F c stk500v1 p atmega168 P dev tty usbserial A8007UF6 b 19200 U flash w main hex You will want to change the serial device as required and replace the main hex with whatever your hex file is called Thanks to Warren for sending me this command AVRDude Cheat Sheet To program AVR chips using this setup I use AVRDude Some common commands are included below Programmer Chip Verification This first test will verify that you have your programmer and chip hooked up correctly If it works you should see a Reading progress bar a device signature and some other text avrdude c usbtiny p m168 Note that p is the part argument change this to match your destination chip See man page or config file avrdude conf to find correct part name for your chip Uploading Program To write to the flash memory you should use a command somewhat like the following adjust for your system of course avrdude V F p atmega644 P dev tty usbserial FTE0U36U C opt local etc avrdude conf c usbtiny b 19200 U flash w Program hex Reading Fuses Reading fuses from a chip can be used to verify what frequency it is running at whether the internal oscilator is enabled etc

    Original URL path: http://digitalcave.ca/resources/avr/avr-programming.jsp (2014-10-09)
    Open archived version from archive

  • The Digital Cave - Nikon CLS Slave Flash Trigger
    io h include util delay h include stdio h include lib analog analog h include lib timer timer h include lib serial serial h Status LED define STATUS LED PORT PORTD define STATUS LED PIN PIND5 Analog pin define ANALOG PIN 0 XSYNC pin define XSYNC PORT PORTB define XSYNC PIN PINB1 The amount of delta required to register a flash define FLASH THRESHOLD 40 The amount of delta required to re calibrate ambient define AMBIENT THRESHOLD 10 The time after the last command pulse before the fire command happens in milli seconds define MIN FIRE PULSE DELAY 45 define MAX FIRE PULSE DELAY 100 The maximum length of a pulse If we read one longer than this then we will re adjust ambient as it is likely just than someone has turned the lights on define MAX PULSE WIDTH 500 The maximum count of pulses If we exceed this we will re adjust ambient as it is likely that we are just sitting on the edge of the flash threshold define MAX PULSE COUNT 20 define DEBUG uint16 t analog 0 Analog input uint16 t ambient 0 Ambient light Will be adjusted over time int16 t flash 0 Delta between ambient and current uint8 t pulse count 0 How many pulses have happened so far uint64 t status time 0 Start time of the current pulse uint64 t pulse end time 0 End time of the last pulse uint64 t time 0 Current time calculated at start of loop ifdef DEBUG char temp 64 endif static inline void fire flash XSYNC PORT BV XSYNC PIN delay ms 1 XSYNC PORT BV XSYNC PIN Pulse status 10 times to confirm flash for uint8 t i 0 i 10 i STATUS LED PORT BV STATUS LED PIN delay ms 5 STATUS LED PORT BV STATUS LED PIN delay ms 20 delay ms 100 static inline void read flash Current analog value analog read a analog flash analog ambient static inline void read ambient uint32 t sum 0 for uint8 t i 0 i 16 i analog read a ambient delay ms 1 sum ambient Divide by 16 2 4 ambient sum 4 ifdef DEBUG sprintf temp Adjusted ambient to d n r ambient serial write s temp endif static inline void reset Reset everything pulse count 0 time timer millis read flash int main void ifdef DEBUG serial init b 9600 endif Analog init uint8 t pins 1 pins 0 ANALOG PIN analog init pins 1 ANALOG INTERNAL Timer init timer init Get initial reading to figure out ambient light take the average of a number of readings read ambient Enable XSYNC and LED in output mode XSYNC PORT 0x1 BV XSYNC PIN STATUS LED PORT 0x1 BV STATUS LED PIN Flash LED five times to confirm we are up and running for uint8 t i 0 i 5 i STATUS LED PORT BV STATUS LED PIN delay ms 10 STATUS LED PORT BV STATUS LED PIN delay ms 50 Main

    Original URL path: http://digitalcave.ca/resources/avr/slave-flash.jsp (2014-10-09)
    Open archived version from archive

  • The Digital Cave - AVR Libraries
    from Atmel application notes and third party libraries As of the time of this writing I have the following libraries included analog simplifies ADC use with both synchronous and asynchronous ISR based implementations Distance simple library for reading the cheap eBay ultrasonic distance sensors eeprom my first library reads and writes from to EEPROM i2c driver for hardware based i2c Master implementation deprecated use twi for new projects manchester mancheter encoding utility for use with 433MHz transmitter receiver pairs psx PSX Controller driver see the dedicated page for details pwm timer ISR based PWM generation can be used on any pins ring ring buffer implementation used in serial library sd card read write to SD cards serial serial RX and TX can use synchronous polling and asynchronous ISR implementations for either RX and TX ShiftRegister interface with 74595 shift registers timer timer which can provide time since startup in both ms and us depending on available hardware Multiple implementations for timer0 and timer1 for various AVR chipsets twi updated twi i2c library supports all modes of operation master read write and slave read write based off of the Arduino TWI library and updated for more configurability universal controller client library for integrating the universal controller with projects ws2811 control the various RSG LED strips out there including a version which can be run on 8MHz AVR on internal resonator The SD card library was written by Roland Riegel and only slightly modified by me The i2c library was originally a sample in an Atmel application note but was heavily modified by me to work as a library and to conform to my coding API standard The PSX library was originally written by Bill Porter but over the course of my modifications there is just about no code of his left

    Original URL path: http://digitalcave.ca/resources/avr/lib.jsp (2014-10-09)
    Open archived version from archive

  • The Digital Cave - AVR PSX Controller Library
    ddr static volatile uint8 t clock ddr static volatile uint8 t command ddr static volatile uint8 t attention ddr Define pins to use static uint8 t clock pin static uint8 t command pin static uint8 t attention pin static uint8 t data pin Common structure for last read data static uint8 t data 21 Private The actual serial transfer Handles clock The PSX controller is full duplex so this will send a byte as well as receive one uint8 t psx gamepad shift uint8 t transmit byte uint8 t received byte 0 for uint8 t i 0 i 8 i Drop the clock clock port BV clock pin set the command outgoing pin if transmit byte BV i command port BV command pin else command port BV command pin wait half the clock cycle delay us CTRL CLK raise the clock to HIGH clock port BV clock pin at which point you read the data if data in BV data pin received byte BV i and wait the other half of the clock cycle delay us CTRL CLK Clock should already be high at this point but just to be sure clock port BV clock pin return received byte Private Sends a command using the shift method void psx send command uint8 t send data uint8 t size Before you submit each command packet you must set attention low once you are done each packet return it high You have to toggle the line before you submit another command attention port BV attention pin command port BV command pin Clock should always be high it is an active low line clock port BV clock pin for uint8 t i 0 i size i send data i psx gamepad shift send data i attention port BV attention pin Reads the gamepad You need to call this whenever you want updated state void psx read gamepad data 0 0x01 data 1 0x42 for uint8 t i 2 i 21 i data i 0x00 psx send command data 21 Initialize the pins and set the controller up to the correct mode This must be called before any other psx functions are called TODO separate the config options into optional functions and call based on flags to allow calling programs to determine what options to use Note We extrapolate the DDR and PIN registers based off of the associated PORT register This assumes that the DDR and PIN registers come directly after the PORT equivalents with DDRX at the next address after PORTX and PINX coming at the next address after DDRX This is valid for all the chips I have looked at however it is highly recommended that you check any new chips which you want to use this library with void psx init volatile uint8 t data port uint8 t data pin volatile uint8 t clock port uint8 t clock pin volatile uint8 t command port uint8 t command pin volatile uint8 t attention port uint8 t attention pin Store the ports

    Original URL path: http://digitalcave.ca/resources/avr/psx.jsp (2014-10-09)
    Open archived version from archive