W3vina.COM Free Wordpress Themes Joomla Templates Best Wordpress Themes Premium Wordpress Themes Top Best Wordpress Themes 2012
syntax highlighter

syntax highlighter

jan 01

Hello world written in php withouth the [ php ] tag:




echo «Hello world!»;
?>

with the [ php ] and [/ php ] tags:


Some large block with C code

#include 
#include 
#include 
#include 
#define rxPin 2
#define txPin 3
#define ONE_WIRE_BUS 5
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
DeviceAddress utesensor = { 0x28, 0x7E, 0xF9, 0x5E, 0x2, 0x0, 0x0, 0x42 }; // loddet på 3.5mm
// DeviceAddress innetemp = { 0x28, 0xF0, 0x12, 0x5F, 0x02, 0x0 , 0x0, 0x9E }; //  på hylla
DeviceAddress innesensor = { 0x28,0x2A,0xDE,0x5E,0x02,0x00,0x00,0x19 }; // I BODEN.
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte gw[] = {10,0,0,101};
byte server[] = { 88,87,42,5 }; // gmx.no
byte subnet[] = { 255, 255, 255, 0 };

SoftwareSerial lcdSerial =  SoftwareSerial(rxPin, txPin);
int ledPin = 6;
int avgwatt = 5;
int switchPin = 7;
const int numReadings = 20;
unsigned long period_start;
unsigned long period_length = 57000;
unsigned long period_total;
unsigned long period_stop;
unsigned long run = 0;
int period_average;
int period_counter;
float itemp;
float utemp;

void setup()
{
  Serial.begin(9600);
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  pinMode(switchPin, INPUT);
  pinMode(ledPin, OUTPUT);
  lcdSerial.begin(9600);
  sensors.begin();
  sensors.setResolution(innesensor, 12);
  sensors.setResolution(utesensor, 12);
}
void loop()
{
  sensors.requestTemperatures(); // Send the command to get temperatures
  lcdcls();
  period_total = 0;
  period_counter = 0;
  period_start = millis();
  period_stop = period_start + period_length;
  if (run > 0) {
     lcdgoTo(0);
     lcdSerial.print(avgwatt);
     lcdSerial.print(" Current.  ");
     lcdgoTo(17);
     lcdSerial.print(period_average);
     lcdSerial.print(" Average.  ");

      }
      else {        // First run.. write no data.
     lcdgoTo(0);
     lcdSerial.print("No data.");
     lcdgoTo(17);
     lcdSerial.print("No data.");

      }

  while( millis() 
			
						
																	
		

Leave a Reply

Din e-postadresse vil ikke bli publisert. Obligatoriske felt er merket med *

Du kan bruke disse HTML-kodene og -egenskapene: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>