Search in Pinguino World !!

Saturday, April 3, 2010

Hidden function in Pinguino

I am working with a GSM modem and Pinguino. To send command to the modem, i used the UART and AT commands. The problem was to set a correct time out when receiving answer from the modem. I wanted to use the millis instruction, but i was afraid by an overflow of the time variable.
So i decided to use a hidden variable in Pinguino, _millis. This variable is used in the arduinodelay library and is incremented every milli second. I copied this example of my code:
 #include <string.h>

unsigned char caractere;
unsigned char chaine[50];
long tempo;
unsigned char index;

unsigned char gsm_echo(unsigned char state)
{
Serial.flush();
_millis=0;
index=0;
if (state) Serial.print("ATE1\r");
else Serial.print("ATE0\r");
while (_millis<100)
{
if Serial.available()
{
caractere=Serial.read();
chaine[index]=caractere;
index++;
}
}
chaine[index]=0;
if (strstr(chaine,"OK")!=0) return 0;
else return 1;
}

void setup()
{
Serial.begin(9600);
pinMode(0,OUTPUT);
digitalWrite(0,LOW);
tempo=millis();
}

void loop()
{
debut:
delay(500);
if (gsm_echo(0)==1) goto debut;
delay(500);
digitalWrite(0,HIGH);
while (1);
}

The millis instruction in the setup function is just used to initialise the library.
_millis variable is already declared in the arduinodelay library.

Hope it will be useful for everybody.

Thursday, April 1, 2010

Pinguino Forum is open !!

Jeremy started a Pinguino Forum on his website. Yet another welcomed contribution and another way to share ideas, libs and many useful things for us.

Thanks to Jeremy.

Welcome to all users, sign up here.

Wednesday, March 24, 2010

Please bookmark this link !!

Sergio Alvarez from Colombia did a great job on his blog. A lot of useful example to build and use Pinguino:
- a step by step description to build Pinguino on a test board,
- What is sometime troobleshoothing with windows,
- How to use an I2C ultrasonic range finder ( this one could be integrated in the pinguino tutorial with sergio acknoledgement )



and a lot of well documented things.

And maybe a good way to learn spanish !!

Wednesday, March 17, 2010

Simple example with Processing

I wrote this simple example to help users to associate Processing and Pinguino.
Communication is managed by Stephane Cousot Library and USB link.
Stephane example program is loaded in the Pinguino with the IDE.
A led is connected on PIN 0 of Pinguino.


// How to blink a led on PIN 0 with processing
// Jean-pierre Mandon 2010

import hypermedia.pinguino.*; // import library

Pinguino board; // pinguino object

void setup() {

size( 380, 180 ); // size the window application
board = new Pinguino( this ); // connect to Pinguino board

}

void draw() {

background(0);

fill(0);
if (board.digitalRead(0)==Pinguino.LOW)
board.digitalWrite(0,Pinguino.HIGH); // PIN 0 = 1
else
{ board.digitalWrite(0,Pinguino.LOW); // PIN 0 = 0
fill(255,0,0);
}
rect(170,70,40,40);
delay(100);

}

Stephane processing Library can be downloaded here.
The pinguino side program is here.

Sunday, March 14, 2010

Pinguino and PERL

Marin Purgar wrote a perl script to drive a pinguino. It is very simple and well documented on his website.

Saturday, March 13, 2010

Pinguino Team Croatia

Marin Purgar from croatia sent me pictures of his design.





Marin want to use Pinguino to drive a CNC machine.

Great design, congratulations Marin !!

Saturday, March 6, 2010

Ham radio and Pinguino

EI9GQ built a VFO and used Pinguino to drive LCD.





EI9GQ pusblished a paper in the the november 2009 and march 2010 issue of RADCOM, The Radio Society of Great Britain Members' magazine. I'm pleased to know that Pinguino is used in ham radio. A long time ago, i was F6HOJ !!

73's EI9GQ...............

Automated installation on Linux

Raul Zanardo from Brazil wrote a shell script to install Pinguino on Linux.
This script was used on Ubuntu 9.10. It download Pinguino on the website, create a folder, copy rules files and create a Microchip group.
So you can use pinguino as is with good rules for the USB device.

Congratulations Raul.

Installation script.

Yet another design for Pinguino !!

Vasile designed a new 18F4550 board with external power supply.



He used Kicad to draw this board. He's currently testing this version and files will be available soon.
Nice job Vasile.

Vasile website.

Pinguino Venezuela

Joan Espinoza started a great project to develop Pinguino in Venezuela. This is the link to the Website.


Joan presented his project during the DevCamp event in february 2010.


His goal is to develop and promote Pinguino project for electronics, programmers and students in Venezuela. This community offer help to incorporate a multi-support language for the Pinguino IDE.

Thanks Joan and all Venezuelan users, this is yet another initiative to expand use of Pinguino and make it simpler for everyone.

PinguinoVE on twitter.
PinguinoVE website.