Screen – Duplicates terminal views

Screen is a full-screen window manager that multiplexes a physical terminal between several processes.  You can use it to duplicate the same terminal view in different places. Good resources http://www.nixtutor.com/linux/introduction-to-gnu-screen/    

Read More

Updating Project Settings

Changing The Output File Name Select Menu Run > Debug configurations from the top menu. Main tab Remote Absolute File Path for C/C++ Application: Set to the path where the application will be running on the Raspberry, e.g. /home/pi/projects/my_project.a    (you can't use ${ProjName} or ${project_name} here) New RPi IP Address If your Raspberry Pi has […]

Read More

Create New Eclipse Project For The RPi

  Creating A New Eclipse Project Eclipse uses workspaces, which is simply a folder where you have one or more projects. You can switch workspace to a new workspace so if you want to you can simply start with a workspace that has a single project and change to a new workspace when you want to […]

Read More

Using The PiFace In A C Project

Schematic A schematic is available here. Setup The RPI Ready To Use The PiFace PiFace uses the SPI port.  Enable the SPI port following the instructions here. C Source Code Our C driver for the PiFace can be downloaded from GitHub here. We also have a version which allows PiFace inputs to be used as outputs […]

Read More

Distribution using dropbox, web server, etc

Creating The Install File – Zip Zip your file or files following the instructions here. The files executable permission is kept when it is zipped and will remain when it is unzipped again. Copy the .gz zip file to the public folder in your dropbox. Get its public link. Instructions To Then Install From The Dropbox […]

Read More

Accessing The Database

Connecting Global Things #define DATABASE_NAME "YOUR_DATABASE_NAME" #define DATABASE_USERNAME "YOUR_DATABASE_USERNAME" #define DATABASE_PASSWORD "YOUR_DATABASE_PASSWORD" MYSQL *mysql1;   Connect and Disconnect #include <mysql/mysql.h> //***************************************** //***************************************** //********** CONNECT TO DATABASE ********** //***************************************** //***************************************** void mysql_connect (void) { //initialize MYSQL object for connections mysql1 = mysql_init(NULL); if(mysql1 == NULL) { fprintf(stderr, "%s\n", mysql_error(mysql1)); return; } //Connect to the database if(mysql_real_connect(mysql1, […]

Read More

Adding Libraries To Eclipse For Windows

Libraries installed on the RPi need to be available for eclipse on windows for it to compile then they are used. The following is basically a copy of the solution we came up with for mysql here. Getting Compiled Library Files Into Eclipse For Windows If you are not coding on the RPi itself, for instance developing […]

Read More

Setup MySQL C Access

Some of this is based on the excellent guide here. Installing The MySQL C libraries MySQL comes with C-libraries: sudo apt-get update sudo apt-get upgrade sudo apt-get install libmysqlclient-dev Using In A Geany Project Include the library in your source files #include <mysql/mysql.h> Add these to the LIBS and CFLAGS sections of your makefile `mysql_config […]

Read More

MySQL

  Installing MySQL If you want MySQL also do the following: sudo apt-get install mysql-server sudo apt-get install php5-mysql The php5-mysql install adds the mysql libraries to allow PHP to access the mysql database. Accessing MySQL from the command line First connect to the database and specify a user: mysql -p -u root Then enter […]

Read More