Sharing files over the network is incredibly handy, when I was writing code examples to publish on this site it was useful to run them on the Raspberry PI, copy them to a folder which could be accessed on my Windows 7 PC. Install and…
shedboy71
-
-
In this example we will add an LCD plate to our Raspberry PI, you could of course add an LCD and connect it up manually but this was an easier method which I wanted to investigate. Here i s a picture of the plate I purchased…
-
In this example we use the database we created in the create database example and we will simply display all rows in the database [codesyntax lang=”python”] #!/usr/bin/python import sqlite3 as lite import sys con = lite.connect(‘test.db’) with con: cur = con.cursor() cur.execute(“SELECT * FROM Jobs”)…
-
In this example we create a SQLite database and insert some sample data into it, we will use this database in later examples [codesyntax lang=”python”] import sqlite3 as lite import sys con = lite.connect(‘test.db’) with con: cur = con.cursor() cur.execute(“CREATE TABLE Jobs(Id INT, Name TEXT,…
-
Another example using the pi4j library, this time displaying various clock speeds on your system [codesyntax lang=”java”] import com.pi4j.system.NetworkInfo; import com.pi4j.system.SystemInfo; import java.io.IOException; import java.text.ParseException; public class clockinfo { public static void main(String[] args) throws InterruptedException, IOException, ParseException { System.out.println(“—————————————————-“); System.out.println(“CLOCK INFO”); System.out.println(“—————————————————-“); System.out.println(“ARM Frequency…
-
This code example shows how to display some hardware information using the pi4l java library [codesyntax lang=”java”] import com.pi4j.system.NetworkInfo; import com.pi4j.system.SystemInfo; import java.io.IOException; import java.text.ParseException; public class hardwareinfo { public static void main(String[] args) throws InterruptedException, IOException, ParseException { System.out.println(“—————————————————-“); System.out.println(“HARDWARE INFO”); System.out.println(“—————————————————-“); System.out.println(“Serial Number…