Blackpool Computer Club is sponsored by: ThisHosting.Rocks

User Tools

Site Tools


testing_toc_and_headers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

testing_toc_and_headers [2018/08/09 11:15] (current)
admin created
Line 1: Line 1:
 +testing TOC and headers
  
 +===== header5 =====
 + this is some code you can download by clicking the file name in the tab.
 +
 +==== header4 ====
 + this is some code you can download by clicking the file name in the tab.
 +
 +=== header3 ===
 + this is some code you can download by clicking the file name in the tab.
 +
 +
 +
 +==== picture ====
 +Fishing for ducks
 + ​{{2012-06-30_07.42.21.jpg}}
 +
 +
 +this is some code you can download by clicking the file name in the tab.
 +
 +<file c foo.c>/*
 + * flashLED.c
 + *
 + ​* ​ Created on: 21-Feb-2011
 + ​* ​     Author: user
 + */
 +
 +#include <​avr/​io.h>​
 +#include <​util/​delay.h>​
 +
 +// This program will turn the LEDs on for 100ms,
 +// then off for 200ms, endlessly.
 +
 +int main(void)
 +{
 +  // Set Port B pins for 3 and 4 as outputs
 +  // PORTB bit 3 = physical pin #2 on the ATTINY45
 +  // PORTB bit 4 = physical pin #3 on the ATTINY45
 +
 +  DDRB = 0x18;  // In binary this is 0001 1000 (note that is bit 3 and 4)
 +  // AVR-GCC also would accept 0b00011000, by the way.
 +
 +  // Set up a forever loop using your favorite C-style '​for'​ loop
 +  for ( ; 1==1 ; )  // loop while 1 equals 1
 +  {
 +    // Set Port B pins for 3 and 4 as HIGH (i.e. turn the LEDs on)
 +    PORTB = 0x18;   // If we wanted only PB4 on, it'd be PORTB=0x10
 +
 +    // Use a function (defined in delay.h) to pause 100 milliseconds
 +    _delay_ms(100);​
 +
 +    // Set PORTB to be all LOWs (i.e. turn the LEDs off)
 +    PORTB = 0x00;
 +
 +    // Delay for a 200ms
 +    _delay_ms(200);​
 +  }
 +
 +return 1;
 +}
 + </​file>​
 +===Another picture===
 +{{https://​lh3.googleusercontent.com/​-RzpgYux5YKs/​Uc_wec2mHVI/​AAAAAAAAD2Q/​_CSND5bfmsQ/​w744-h558-no/​IMG_0271.JPG}}
testing_toc_and_headers.txt ยท Last modified: 2018/08/09 11:15 by admin