Posts Tagged ‘php’
07
mag

Hi all!!
Today i show how is possible to connect iPhone to Arduino without any Wifi or Ethernet shields!

Here the app that controls 4 leds (green yellow, red and orange), a DC motor with a fan, a piezo speacker and the room temperature with LM32 sensor!


Arduino iphone control


What you need?
Arduino with anything you want
iPhone / iPad / iPod
– A website to host php pages
– An internet connection on pc (Win + Mac)

What you need to know?
– A little bit of electronics
C language
C# language
PHP language
Objective-C language

Good.
In PHP make a stupid page that get in $_REQUEST a command and store it to a file on server!
Three lines of code…

In C# make a web listener that call php page and checks the output. If any condition are verified, send to COM9 the value that you want to get from arduino.

In C from Arduino, in the Loop() read Serial value. If the value respond to your configuration, call LigthUpLed(green) for example!

In Objective-C make an iPhone App with a stupid layout that call in GET your PHP page and send a command!

To make everithink work, run your C# listener app on Windows and from your iPhone send get call to web server!

Now, your nerd app will control arduino!!!

In this example app that i made, i control HIGH or LOW for Four LEDs, a DC Motor, a Piezo Speacker and a Temperature Sensor.

I used resistors, 4 leds, LM32, DC Motor, TIP120, diode, wires, beer.




Here a screenshot (click to enlarge):


Arduino iphone control

Here a video:



Rif: albertopasca.it

enjoy!

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , ,

06
feb

Hi all,
do tou like Windows Phone 7? Do you want to customize start menu adding images to your tiles???
Like this shot?





I have a solution for it!!!

I created a beta version 0.00001 page that permits you to create automatically tiles for your windows phone!!!

Here a tiny link, useful to open it from phone: http://goo.gl/g9BFS

It’s a simple web page. You can easily upload a photo, set your phone size and click generate!
Easy easy easy!





Now, after loaded an image and generated tiles, you need to center image in internet explorer, open tool bar menu and click “Pin to start” or “Aggiungi a start”, like this:

Move your created tile where you want and compose your collage!

Easy to use, cool to show!

enjoy and send me a feedback!

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , ,

23
lug

Può capitare di dover utilizzare diversi virtual host per eseguire i vostri script in php, ma la configurazione di apache?

Trovate il file https.conf e apritelo con un editor di testo.
Per un server locale e soprattutto per sviluppo locale, banalmente possono essere configurate alcune opzioni.

Queste sono le porte sulle quali viene cercato il servizio:

1
2
Listen 90
Listen 91

Nel mio caso, php gira sulle porte 90, 91. Di default gira su 80.

Impostate il server predefinito:

1
ServerName localhost:90

Impostate le vostre document root:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#Nel mio caso C:/Work...
DocumentRoot "C:/Work"

#C:/Work è la root del primo host
<directory "C:/Work">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</directory>

#C:/TEMP è la root del secondo host
<directory "C:/TEMP/">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</directory>


…e ci siamo quasi. Non resta che localizzare il file httpd-vhosts.conf nel quale viene configurato il vostro secondo host.

Inserire questa stringa:

1
2
3
4
<virtualhost localhost:91>
        DocumentRoot C:/TEMP
        ServerName temp      
</virtualhost>

Adesso riavvio veloce di Apache Server… e gli indirizzi

http://localhost:90/

e

http://localhost:91/

dovrebbero funzionare correttamente.

Nel mio caso è stato utilizzato come server Apache/PHP/mySQL, XAMPP, liberamente scaricabile da qui.

[ref -> albertopasca.it]

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , ,

23
lug

Benvenuti nel blog degli appunti di viaggio!

Snipplets, funzioni interessanti, configurazioni di vario tipo, quasi tutto legato alla programmazione.

Iscriviti ai feed per essere sempre aggiornato sulle modifiche.

Avviso per gli utenti:
- i commenti verranno approvati prima della pubblicazione
- evitare lo spam o commenti inutili
- se si desidera commentare con codice usare la sintassi:

[cc lang= "lang" ] codice [/cc]

1
2
3
    private String funzione () {
        return "TEST";
    }

I linguaggi evidenziabili sono i seguenti:
abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cmake, cobol, cpp-qt, cpp, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, gettext, glsl, gml, gnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle11, oracle8, pascal, per, perl, php-brief, php, pic16, pixelbender, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xml, xorg_conf, xpp, yaml, z80

albertopasca.it

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , ,

Switch to our mobile site