Table of Contents

datacomm Keyword 2

Network Sockets

Definition

Network sockets are used to send and recive data via a out side source and are widely used for intenet applications and data comunications.

References

    * Data coomuncations class
    * and yes belive it or not we did touch on this in Cisco fundementals
    * Beej's guid to network programing

Demonstration

thsi would be here if i knew a smaple cod ei could write to show this but only thing i have are other peoples work none of my oun yet still reading

datacomm Keyword 2 Phase 2

Raspberry Pi is a mini perosnal computer not much larger then a smart phone. However the rasberry pi dose not have a screen nor a normal I/O busses system it has 2 micro USB 2.0 i belive and a single ethernet buss. With this and the right equipment a person who I know did this project named Andrew Sowers established that you could make a coffee pot brew a pot of coffee using the rasberry pi as an interfact with the on off switch, While using the asterisk pbx server to call in and tell the rasberry pi to turn on coffee mechine could brew coffee and in this he is showing that there are C and C++ libarys built into most standard libary packages that allow an interface with a basic appliance such as turn on and turn off. The more common reason they have this is when you shut down a computer your telling it do what you need to do save what you need to save and turn off all processing and programs and turn off the power supply and in this case more or less an applaince.

Raspberry Pi GPIO Programming

The Raspberry Pi hosts a General Purpose Input Output board for interfacing with low level peripherals. Dragon.net was nice enough to write a detailed C library for the GPIO to make electronics programming super easy! Here's an example of a program that turns on and off an LED:

/*
 * blink.c:
 *      Simple test program to blink an LED on pin 7
 */
 
#include <wiringPi.h>
#include <stdio.h>
 
int main (void)
{
  int pin = 7;
  printf("Raspberry Pi wiringPi blink test\n");
 
  if (wiringPiSetup() == -1)
    exit (1);
 
  pinMode(pin, OUTPUT);
 
  for (;;){
    printf("LED On\n");
    digitalWrite(pin, 1);
    delay(250);
    printf("LED Off\n");
    digitalWrite(pin, 0);
    delay(250);
  }
 
  return 0;
}

by way of this reference I hope to setup a simple c application using a solid state relay for my future automated “Dial a Coffee” via Asterisk and Pi ingenuity:http://elinux.org/RPi_Low-level_peripherals#GPIO_Driving_Example_.28C.29

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$