Iteaduino

From Futuragora Wiki

https://itead.cc/wiki/Download

https://itead.cc/wiki/Iteaduino_Plus_A10/A20

https://itead.cc/wiki/ITEAD_SDK_Instruction

https://github.com/itead/Segnix

Network problem

Support 1000M-Ethernet This image supports both 100M and 1000M Ethernet. The default set is 1000M-Ethernet. Switch to 100M-Ethernet, the command is

sudo itead-ethernet emac

Switch to 1000M-Ethernet, the command is sudo itead-ethernet gmac

=Iteaduino Code

Relay1

#include <itead.h>
int pin=138;
int main()
{ 
pinMode(138, OUTPUT);
digitalWrite(pin, HIGH);
} 



#include <itead.h>
int pin=138;
int main()
{ 
pinMode(138, OUTPUT);
digitalWrite(pin, LOW);
} 



Blink Test

#include <itead.h>
int pin=138;
int main()
{ 
pinMode(138, OUTPUT);
while(1)
 {
digitalWrite(pin, HIGH);
delay(1000);
digitalWrite(pin, LOW);
delay(1000);
 }
} 


To use Segnix in Python

Create a new file named blink.py which reads as follow:

  1. ! /usr/bin/env python

from iteadsdk import * LED = PG9 pinMode(LED, OUTPUT) while True:

   digitalWrite(LED, HIGH)
   delay(1000)
   digitalWrite(LED, LOW)
   delay(1000)
#! /usr/bin/env python
from iteadsdk import *
R1 = PG9
pinMode(R1, OUTPUT)
digitalWrite(R1, HIGH)

fswebcam -r 640x480 --jpeg 85 -D 1 camshot.jpg

apt-get install fswebcam
apt-get install v4l-utils

scp ./camshot.jpg root@10.7.0.1:/home/futuragora/public_html/futurai/opensenses/ms05/