SlideShare a Scribd company logo
pcDuino
A New Way To Innovate

www.pcduino.com
learn.linksprite.com
Agenda



pcDuino: a platform open source software meets open source
hardware
Programming under Ubuntu (linux)







Programming under Android ICS





Arduino style programming ( C ) for pcDuino
Python programming for pcDuino
Java programming for pcDuino
Cloud 9 IDE

Command line programming
QT GUI

Friends help Friends Program




Friends help Friends - PCB
Friends help Friends - Assembly
Friends help Friends -Distribution
pcDuino: where open software meets open hardware


pcDuino = mini PC + Arduino

pcDuino is a kind of super Arduino with the brain
power of a mini PC.

Existing Arduino shield can work on pcDuino.

pcDuino can run Ubuntu. The desktop outputs from
HDMI. User can remotely access its desktop via VNC
(Network or OTG-USB).

pcDuino has built-in Arduino style IDE environment.
It also supports programming in Python, Cloud 9
IDE, Java, Go-lang, Scratch, etc.

pcDuino can run full Android ICS, and support
Arduino style hardware programming under Android.

pcDuino is a server, a WiFi router, a printer
server, a IP-PBX, and more.
pcDuino is a platform where open software meets open
hardware.

pcDuino Family
pcDuino Lite

pcDuino Lite WiFi

pcDuino v1

pcDuino v2

CPU

Allwinner A101GHz
ARM Cortex A8

Allwinner A101GHz
ARM Cortex A8

Allwinner A101GHz
ARM Cortex A8

Allwinner A101GHz
ARM Cortex A8

GPU

OpenGL
ES2.0OpenVG 1.1
Mali 400 core

OpenGL
ES2.0OpenVG 1.1
Mali 400 core

OpenGL
ES2.0OpenVG 1.1
Mali 400 core

OpenGL
ES2.0OpenVG 1.1
Mali 400 core

DRAM

512MB

256MB

1GB

Storage

2GB Flash (4GB after 2GB Flash (4GB after
NO FlashmicroSD
2GB FlashmicroSD
2/1/2014)microSD
2/1/2014)
card (TF) slot for up to card (TF) slot for up to
card (TF) slot for up to microSD card (TF) slot
32GB
32GB
32GB
for up to 32GB

Video

HDMI

HDMI

HDMI

HDMI

OS Support

• Lbuntu 12.04
•Android

•Lbuntu 12.04
•Doesn’t support
Android

•Lbuntu 12.04
•Android

•Lbuntu 12.04
•Android

ExtensionInterface

2.54mm headers

Arduino (TM) Headers

2.54mm headers

Arduino (TM) Headers

NetworkInterface

•10/100Mbps RJ45
•USB WiFi extension
(not included)

WiFi, No Ethernet

•10/100Mbps RJ45
•USB WiFi extension
(not included)

•10/100Mbps RJ45
•WiFi

Power

5V, 2000mA

5V, 2000mA

5V, 2000mA

5V, 2000mA

1GB

pcDuino v3
pcDuino hardware interfaces
pcDuino boot modes




Default to boot from SD
If there is no bootable image in SD, it will try to boot
from NAND.
For Ubuntu OS, the system and data in NAND can be copied
to SD seamlessly.
Programming under Ubuntu (linux)
VNC to pcDuino through its USBOTG
Arduino style programming ( C )


Two flavors



Command line
IDE
C Command line
Setup (one time)
If not already done, set up git. Do this using the command:
ubuntu@ubuntu:~$ sudo apt-get install git

Make sure you’re in your home folder by typing
ubuntu@ubuntu:~$ cd
ubuntu@ubuntu:~$ pwd
/home/Ubuntu
Now download the distribution from github by typing
ubuntu@ubuntu:~$ git clone https://github.com/pcduino/c_enviroment
C Command line
C Command line
Change into the c_enviroment folder:

ubuntu@ubuntu:~$ cd c_enviroment
ubuntu@ubuntu:~/c_enviroment$ ls
Makefile hardware libraries output sample
Now run make to make the libraries and the examples with the following command:
ubuntu@ubuntu:~/c_enviroment$ make
Make[1]: Leaving directory `/home/ubuntu/c_enviroment/sample'
The resulting binary files are found in the output/test folder
ubuntu@ubuntu:~/c_enviroment$ cd output/test
ubuntu@ubuntu:~/c_enviroment/output/test$ ll
total 660
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 27 06:59 ./
drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 27 06:49 ../
-rwxrwxr-x 1 ubuntu ubuntu 13868 Apr 27 06:58 adc_test*
-rwxrwxr-x 1 ubuntu ubuntu 28284 Apr 27 06:58 adxl345_test*
-rwxrwxr-x 1 ubuntu ubuntu 14209 Apr 27 06:58 interrupt_test*
-rwxrwxr-x 1 ubuntu ubuntu 13726 Apr 27 06:58 io_test*
-rwxrwxr-x 1 ubuntu ubuntu 13712 Apr 27 06:59 linker_button_test*
-rwxrwxr-x 1 ubuntu ubuntu 13907 Apr 27 06:59 linker_buzzer_test*
-rwxrwxr-x 1 ubuntu ubuntu 13689 Apr 27 06:59 linker_hall_sensor_test*
-rwxrwxr-x 1 ubuntu ubuntu 13760 Apr 27 06:59 linker_joystick_test*
-rwxrwxr-x 1 ubuntu ubuntu 13769 Apr 27 06:59 linker_led_bar_test*
-rwxrwxr-x 1 ubuntu ubuntu 13690 Apr 27 06:59 linker_led_test*
-rwxrwxr-x 1 ubuntu ubuntu 14290 Apr 27 06:59 linker_light_sensor_test*
““
C Command line
To view the contents of a sample sketch, (this
example we’ll look at the contents of
linker_led_test.c) type:
ubuntu@ubuntu:~/c_enviroment/sample$ cat
linker_led_test.c
/*
* LED test program
*/
#include <core.h>
int led_pin = 1;
void setup()
{
if(argc != 2){
goto _help;
}
led_pin = atoi(argv[1]);
if((led_pin < 0) || (led_pin > 13)){
goto _help;
}
pinMode(led_pin, OUTPUT);
return;
_help:
printf("Usage %s LED_PIN_NUM(0-13)n", argv[0]);
exit(-1);
}

void loop()
{
digitalWrite(led_pin, HIGH); // set the LED
on
delay(1000); // wait for a second
digitalWrite(led_pin, LOW); // set the LED
off
delay(1000); // wait for a second
}
Creating Your Own Sketch
ubuntu@ubuntu:~/c_enviroment/sample$ nano button_led.c
An empty nano screen should appear.
Copy and paste the following code into it. (Remember to paste in nano at the cursor,
just right click the mouse button).
#include <core.h> // Required first line to run on pcDuino
int ledPin = 8;
int buttonPin = 7;
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
Creating Your Own Sketch
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
digitalWrite(ledPin, LOW);
}
}
Creating Your Own Sketch
Modify the Makefile and Compile
ubuntu@ubuntu:~/c_enviroment/sample$ nano Makefile
You will see a section that lists all the OBJS something like:
OBJS = io_test adc_test pwm_test spi_test adxl345_test serial_test liquidcrystal_i2c
liquidcrystal_spi interrupt_test tone_test
OBJS += linker_led_test linker_potentiometer_test linker_tilt_test linker_light_sensor_test
linker_button_test
OBJS += linker_touch_sensor_test linker_magnetic_sensor_test linker_temperature_sensor_test
linker_joystick_test
OBJS += linker_rtc_test linker_sound_sensor_test linker_buzzer_test linker_hall_sensor_test
linker_led_bar_test linker_relay_test
OBJS += pn532_readAllMemoryBlocks pn532readMifareMemory pn532readMifareTargetID
pn532writeMifareMemory
Creating Your Own Sketch

We’re going to add a line to the end of this with the name of the
scketch we just created:
OBJS += button_led
Save the file and exit nano using <CTRL>X with a y and <enter>.
We now run make by typing:
ubuntu@ubuntu:~/c_enviroment/sample$ make
You should see a whole bunch of text with the end being:
button_led.c -o ../output/test/button_led ../libarduino.a
If all went well, you can go to the output/test folder and find your executable you have created:
ubuntu@ubuntu:~/c_enviroment/sample$ cd ../output/test/
ubuntu@ubuntu:~/c_enviroment/output/test$ ll
total 676
drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 27 07:51 ./
drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 27 06:49 ../
-rwxrwxr-x 1 ubuntu ubuntu 13868 Apr 27 07:51 adc_test*
-rwxrwxr-x 1 ubuntu ubuntu 28284 Apr 27 07:51 adxl345_test*
-rwxrwxr-x 1 ubuntu ubuntu 13668 Apr 27 07:51 button_led*
“..(not showing rest of listing here)
Creating Your Own Sketch

Run Your Sketch

To run it, once you have wired up a switch and led to the right pins, type:
ubuntu@ubuntu:~/c_enviroment/output/test$ ./button_led
To stop the program, <Ctrl>C
A Quick Re-Cap

Add #include <core.h> to the top of your sketch.
Create your sketch in the samples folder (if your familiar with linux,
makefiles, and compiling code, you could set up your own)
Add the filename to the Makefile in the samples folder in the OBJS section
without the .c
Run make
Run the executable from the output/test folder.
You can introduce command line arguments into your sketch to make it more
transportable.
Arduino IDE
Arduino IDE
Arduino IDE
Arduino IDE
Arduino IDE
ArduBlock
pcDuino
Hardware Experiments
Potentiometer
LED Dimmer (PWM)
7-seg LED
8x8 LED Matrix
Analog Temperature Sensor
4 Digits 7-segment LEDs
16x02 Character LCD
Digital Humidity and Temperature
Sensor
LED controlled by LDR
Serial Port of pcDuino
Extends to 4 UARTS

http://jbvsblog.blogspot.com/2013/09/pcduino-extends-to-4uarts.html
Ultrasonic Sensor
Stepper
RF Servo
Relay
NFC Shield
Cottonwood:UHF ultra-distance RFID Reader
GPS Shield
Cellular Shield
Powerline Communication
Python
ubuntu@ubuntu:~/python-pcduino/Samples/blink_led$ more blink_led.py
#!/usr/bin/env python
# blink_led.py
# gpio test code for pcduino ( http://www.pcduino.com )
#
import gpio
import time
led_pin = "gpio2"
def delay(ms):
time.sleep(1.0*ms/1000)
def setup():
gpio.pinMode(led_pin, gpio.OUTPUT)
def loop():
while(1):
gpio.digitalWrite(led_pin, gpio.HIGH)
delay(200)
OpenCV
OpenCV
def process(infile):
image = cv.LoadImage(infile);
if image:
faces = detect_object(image)
im = Image.open(infile)
path = os.path.abspath(infile)
save_path = os.path.splitext(path)[0]+"_face"
try:
os.mkdir(save_path)
except:
pass
if faces:
draw = ImageDraw.Draw(im)
count = 0
for f in faces:
count += 1
draw.rectangle(f, outline=(255, 0, 0))
a = im.crop(f)
file_name =
os.path.join(save_path,str(count)+".jpg")
#
print file_name
a.save(file_name)
drow_save_path =
os.path.join(save_path,"out.jpg")
im.save(drow_save_path, "JPEG", quality=80)
else:
print "Error: cannot detect faces on %s" %
infile
if __name__ == "__main__":
process("./opencv_in.jpg")
OpenCV
#!/usr/bin/env python
#coding=utf-8
import os
from PIL import Image, ImageDraw
import cv
def detect_object(image):
grayscale = cv.CreateImage((image.width, image.height), 8, 1)
cv.CvtColor(image, grayscale, cv.CV_BGR2GRAY)
cascade = cv.Load("/usr/share/opencv/haarcascades/haarcascade_frontalface_alt_tree.xml")
rect = cv.HaarDetectObjects(grayscale, cascade, cv.CreateMemStorage(), 1.1, 2,
cv.CV_HAAR_DO_CANNY_PRUNING, (20,20))
result = []
for r in rect:
result.append((r[0][0], r[0][1], r[0][0]+r[0][2], r[0][1]+r[0][3]))
return result
Cloud 9 IDE




Cloud9 IDE is an online development environment
for Javascript and Node.js applications as well
as HTML, CSS, PHP, Java, Ruby and 23 other
languages.
You're programming for the web, on the web.
Teams can collaborate on projects and run them
within the browser. When you're finished,
deploy it—and you're done!
Cloud 9 IDE
QT on pcDuino
QT on pcDuino
Scratch

$sudo apt-get install pcduino-scratch
Go Lang

package main
import (
"fmt"
"./gpio"
"time"
)

func main() {
g, err := gpio.NewGPIOLine(7,gpio.OUT)
if err != nil {
fmt.Printf("Error setting up GPIO %v: %v", 18, err)
return
}
blink(g, 100)
g.Close()
}
func blink(g *gpio.GPIOLine, n uint) {
fmt.Printf("blinking %v time(s)n", n)
for i := uint(0); i &lt; n; i++ {
g.SetState(true)
time.Sleep(time.Duration(1000) * time.Millisecond)
g.SetState(false)
time.Sleep(time.Duration(1000) * time.Millisecond)
}
}
Home Automation:IP controllable LED


Many users are asking if the hardware part can be
programmed together with the Ubuntu linux?


Sure. This is the beauty of pcDuino. The Arduino compatible hardware is a native part
of the OS.



pcDuino includes Ethernet port, USB Wifi dongle, so there is no
need for Ethernet shield, Ethernet shield , USB host shield, MP3
shields and so on.

Now, we are going to implement a TCP/IP
socket server on pcDuino to listen to the
data coming from client.
When it
turn on
it will
receive

receives character ’O', it will
the LED, and when it receives ‘F‛,
turn on the LED. No actions if
something else.
Home Automation:IP controllable LED
#include ‚sys/socket.h‛
#include ‚netinet/in.h‛
#include ‚arpa/inet.h‛
#include
‚sys/types.h‛

void loop()
{
n = read(connfd, sendBuff, strlen(sendBuff) );

int led_pin = 2;
int listenfd = 0, connfd = 0;
int n;
struct sockaddr_in serv_addr;
char sendBuff[1025];
time_t ticks;

if(n>0)
{
if(sendBuff[0]=='O') digitalWrite(led_pin,
HIGH); // set the LED on
if(sendBuff[0]=='F') digitalWrite(led_pin,LOW);
// set the LED off
}
}

void setup()
{
led_pin = 2;
pinMode(led_pin, OUTPUT);
listenfd = socket(AF_INET, SOCK_STREAM, 0);
memset(serv_addr, '0', sizeof(serv_addr));
memset(sendBuff, '0', sizeof(sendBuff));
serv_addr.sin_family = AF_INET;
serv_addr.sin_addr.s_addr = htonl(INADDR_ANY);
serv_addr.sin_port = htons(5000);

bind(listenfd, (struct sockaddr*) serv_addr, sizeof(serv_addr));
listen(listenfd, 10);
connfd = accept(listenfd, (struct sockaddr*)NULL, NULL);
}
Home Automation by Z-wave
pcDuino as 3D printer control
console
pcDuino as banaba piano
Programming under Android ICS
Two flavors to program under Android


There are two flavors to program under
Android:



Command line
QT5 GUI
Command line
QT5 GUI

We can copy the apk though pcDuino OTG or
SD card to pcDunio and install it there.
Friends help Friends





Friends help Friends - PCB
Friends help Friends - Assembly
Friends help Friends -Distribution

Leverage LinkSprite Manufacturing Facility in
Shenzhen, China, and distribution channel
worldwide.
Connect with pcDuino

Facebook.com/linksprit
e

More Related Content

What's hot

Gprs architecture ppt
Gprs architecture pptGprs architecture ppt
Gprs architecture ppt
Arpita Sanghani
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
Wayne Jones Jnr
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
Mac protocols
Mac protocolsMac protocols
Mac protocols
juno susi
 
Topic: ISDN (Integrated Services Digital Network)
Topic: ISDN (Integrated Services Digital Network)Topic: ISDN (Integrated Services Digital Network)
Topic: ISDN (Integrated Services Digital Network)
Dr Rajiv Srivastava
 
Mobile ip overview
Mobile ip overviewMobile ip overview
Mobile ip overview
priya Nithya
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
Anil Kumar Pugalia
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
Maathu Michael
 
OSI Model
OSI ModelOSI Model
OSI Model
Rahul Bandhe
 
6lowpan
6lowpan6lowpan
Transmission Medium
Transmission MediumTransmission Medium
Transmission Medium
sabari Giri
 
Io t system management with
Io t system management withIo t system management with
Io t system management with
xyxz
 
Physical layer ppt
Physical layer pptPhysical layer ppt
Physical layer ppt
Najam Khattak
 
Presentation on Transmission Media
Presentation on Transmission MediaPresentation on Transmission Media
Presentation on Transmission Media
Syed Ahmed Zaki
 
TinyOS
TinyOSTinyOS
OSI Model - Open Systems Interconnection
OSI Model - Open Systems InterconnectionOSI Model - Open Systems Interconnection
OSI Model - Open Systems Interconnection
Adeel Rasheed
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating system
Supriya Kumari
 
peer to peer and client server model
peer to peer and client server modelpeer to peer and client server model
peer to peer and client server model
Bharath Nair
 
Chapter 2 - Network Models
Chapter 2 - Network ModelsChapter 2 - Network Models
Chapter 2 - Network Models
Wayne Jones Jnr
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
Joel P
 

What's hot (20)

Gprs architecture ppt
Gprs architecture pptGprs architecture ppt
Gprs architecture ppt
 
Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 
Mac protocols
Mac protocolsMac protocols
Mac protocols
 
Topic: ISDN (Integrated Services Digital Network)
Topic: ISDN (Integrated Services Digital Network)Topic: ISDN (Integrated Services Digital Network)
Topic: ISDN (Integrated Services Digital Network)
 
Mobile ip overview
Mobile ip overviewMobile ip overview
Mobile ip overview
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
 
OSI Model
OSI ModelOSI Model
OSI Model
 
6lowpan
6lowpan6lowpan
6lowpan
 
Transmission Medium
Transmission MediumTransmission Medium
Transmission Medium
 
Io t system management with
Io t system management withIo t system management with
Io t system management with
 
Physical layer ppt
Physical layer pptPhysical layer ppt
Physical layer ppt
 
Presentation on Transmission Media
Presentation on Transmission MediaPresentation on Transmission Media
Presentation on Transmission Media
 
TinyOS
TinyOSTinyOS
TinyOS
 
OSI Model - Open Systems Interconnection
OSI Model - Open Systems InterconnectionOSI Model - Open Systems Interconnection
OSI Model - Open Systems Interconnection
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating system
 
peer to peer and client server model
peer to peer and client server modelpeer to peer and client server model
peer to peer and client server model
 
Chapter 2 - Network Models
Chapter 2 - Network ModelsChapter 2 - Network Models
Chapter 2 - Network Models
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
 

Viewers also liked

pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
Jingfeng Liu
 
Scratch pcduino
Scratch pcduinoScratch pcduino
Scratch pcduino
Jingfeng Liu
 
pcDuino tech talk at Carnegie Mellon University 10/14/2014
pcDuino tech talk at Carnegie Mellon University 10/14/2014pcDuino tech talk at Carnegie Mellon University 10/14/2014
pcDuino tech talk at Carnegie Mellon University 10/14/2014
Jingfeng Liu
 
Maker Movement
Maker MovementMaker Movement
Maker Movement
Jingfeng Liu
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
Jingfeng Liu
 
openHAB @ ESE2010
openHAB @ ESE2010openHAB @ ESE2010
openHAB @ ESE2010
Kai Kreuzer
 
Home Automation with LinkSprite IO
Home Automation with LinkSprite IOHome Automation with LinkSprite IO
Home Automation with LinkSprite IO
Jingfeng Liu
 
Manual del equipo Sistema Control de Acceso v1.0
Manual del equipo Sistema Control de Acceso v1.0Manual del equipo Sistema Control de Acceso v1.0
Manual del equipo Sistema Control de Acceso v1.0
Daniel Gonzalez
 

Viewers also liked (8)

pcDuino Presentation at SparkFun
pcDuino Presentation at SparkFunpcDuino Presentation at SparkFun
pcDuino Presentation at SparkFun
 
Scratch pcduino
Scratch pcduinoScratch pcduino
Scratch pcduino
 
pcDuino tech talk at Carnegie Mellon University 10/14/2014
pcDuino tech talk at Carnegie Mellon University 10/14/2014pcDuino tech talk at Carnegie Mellon University 10/14/2014
pcDuino tech talk at Carnegie Mellon University 10/14/2014
 
Maker Movement
Maker MovementMaker Movement
Maker Movement
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
openHAB @ ESE2010
openHAB @ ESE2010openHAB @ ESE2010
openHAB @ ESE2010
 
Home Automation with LinkSprite IO
Home Automation with LinkSprite IOHome Automation with LinkSprite IO
Home Automation with LinkSprite IO
 
Manual del equipo Sistema Control de Acceso v1.0
Manual del equipo Sistema Control de Acceso v1.0Manual del equipo Sistema Control de Acceso v1.0
Manual del equipo Sistema Control de Acceso v1.0
 

Similar to Introduction to pcDuino

Innovation with pcDuino
Innovation with pcDuinoInnovation with pcDuino
Innovation with pcDuino
Jingfeng Liu
 
Embedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptxEmbedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptx
aartis110
 
Let's begin io t with $10
Let's begin io t with $10Let's begin io t with $10
Let's begin io t with $10
Makoto Takahashi
 
DeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel EdisonDeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel Edison
Gabriel Arnautu
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
FTS seminar
 
notes about Arduino
notes about Arduinonotes about Arduino
notes about Arduino
Hesham Elsherbieny
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
GlobalLogic Ukraine
 
Advanced view arduino projects list use arduino for projects
Advanced view arduino projects list   use arduino for projectsAdvanced view arduino projects list   use arduino for projects
Advanced view arduino projects list use arduino for projects
WiseNaeem
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
Ajay578679
 
Ch_2_8,9,10.pptx
Ch_2_8,9,10.pptxCh_2_8,9,10.pptx
Ch_2_8,9,10.pptx
yosikit826
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
tomtobback
 
arduino
arduinoarduino
arduino
murbz
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Luki B. Subekti
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
videos
 
Ardu
ArduArdu
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
LloydMoore
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
Shotaro Uchida
 
MicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionMicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introduction
sdoro58
 
An introduction to Arduino
An introduction to ArduinoAn introduction to Arduino
An introduction to Arduino
Emertxe Information Technologies Pvt Ltd
 

Similar to Introduction to pcDuino (20)

Innovation with pcDuino
Innovation with pcDuinoInnovation with pcDuino
Innovation with pcDuino
 
Embedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptxEmbedded L1_notes_unit2_architecture.pptx
Embedded L1_notes_unit2_architecture.pptx
 
Let's begin io t with $10
Let's begin io t with $10Let's begin io t with $10
Let's begin io t with $10
 
DeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel EdisonDeviceHub - First steps using Intel Edison
DeviceHub - First steps using Intel Edison
 
Arduino Development For Beginners
Arduino Development For BeginnersArduino Development For Beginners
Arduino Development For Beginners
 
notes about Arduino
notes about Arduinonotes about Arduino
notes about Arduino
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
 
Advanced view arduino projects list use arduino for projects
Advanced view arduino projects list   use arduino for projectsAdvanced view arduino projects list   use arduino for projects
Advanced view arduino projects list use arduino for projects
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
 
Ch_2_8,9,10.pptx
Ch_2_8,9,10.pptxCh_2_8,9,10.pptx
Ch_2_8,9,10.pptx
 
Cassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshopCassiopeia Ltd - standard Arduino workshop
Cassiopeia Ltd - standard Arduino workshop
 
arduino
arduinoarduino
arduino
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
Ardu
ArduArdu
Ardu
 
Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
 
MicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introductionMicroPython for LEGO Spike - introduction
MicroPython for LEGO Spike - introduction
 
An introduction to Arduino
An introduction to ArduinoAn introduction to Arduino
An introduction to Arduino
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

Introduction to pcDuino

  • 1. pcDuino A New Way To Innovate www.pcduino.com learn.linksprite.com
  • 2. Agenda   pcDuino: a platform open source software meets open source hardware Programming under Ubuntu (linux)      Programming under Android ICS    Arduino style programming ( C ) for pcDuino Python programming for pcDuino Java programming for pcDuino Cloud 9 IDE Command line programming QT GUI Friends help Friends Program    Friends help Friends - PCB Friends help Friends - Assembly Friends help Friends -Distribution
  • 3. pcDuino: where open software meets open hardware  pcDuino = mini PC + Arduino pcDuino is a kind of super Arduino with the brain power of a mini PC.  Existing Arduino shield can work on pcDuino.  pcDuino can run Ubuntu. The desktop outputs from HDMI. User can remotely access its desktop via VNC (Network or OTG-USB).  pcDuino has built-in Arduino style IDE environment. It also supports programming in Python, Cloud 9 IDE, Java, Go-lang, Scratch, etc.  pcDuino can run full Android ICS, and support Arduino style hardware programming under Android.  pcDuino is a server, a WiFi router, a printer server, a IP-PBX, and more. pcDuino is a platform where open software meets open hardware. 
  • 4. pcDuino Family pcDuino Lite pcDuino Lite WiFi pcDuino v1 pcDuino v2 CPU Allwinner A101GHz ARM Cortex A8 Allwinner A101GHz ARM Cortex A8 Allwinner A101GHz ARM Cortex A8 Allwinner A101GHz ARM Cortex A8 GPU OpenGL ES2.0OpenVG 1.1 Mali 400 core OpenGL ES2.0OpenVG 1.1 Mali 400 core OpenGL ES2.0OpenVG 1.1 Mali 400 core OpenGL ES2.0OpenVG 1.1 Mali 400 core DRAM 512MB 256MB 1GB Storage 2GB Flash (4GB after 2GB Flash (4GB after NO FlashmicroSD 2GB FlashmicroSD 2/1/2014)microSD 2/1/2014) card (TF) slot for up to card (TF) slot for up to card (TF) slot for up to microSD card (TF) slot 32GB 32GB 32GB for up to 32GB Video HDMI HDMI HDMI HDMI OS Support • Lbuntu 12.04 •Android •Lbuntu 12.04 •Doesn’t support Android •Lbuntu 12.04 •Android •Lbuntu 12.04 •Android ExtensionInterface 2.54mm headers Arduino (TM) Headers 2.54mm headers Arduino (TM) Headers NetworkInterface •10/100Mbps RJ45 •USB WiFi extension (not included) WiFi, No Ethernet •10/100Mbps RJ45 •USB WiFi extension (not included) •10/100Mbps RJ45 •WiFi Power 5V, 2000mA 5V, 2000mA 5V, 2000mA 5V, 2000mA 1GB pcDuino v3
  • 6. pcDuino boot modes    Default to boot from SD If there is no bootable image in SD, it will try to boot from NAND. For Ubuntu OS, the system and data in NAND can be copied to SD seamlessly.
  • 8. VNC to pcDuino through its USBOTG
  • 9. Arduino style programming ( C )  Two flavors   Command line IDE
  • 10. C Command line Setup (one time) If not already done, set up git. Do this using the command: ubuntu@ubuntu:~$ sudo apt-get install git Make sure you’re in your home folder by typing ubuntu@ubuntu:~$ cd ubuntu@ubuntu:~$ pwd /home/Ubuntu Now download the distribution from github by typing ubuntu@ubuntu:~$ git clone https://github.com/pcduino/c_enviroment
  • 12. C Command line Change into the c_enviroment folder: ubuntu@ubuntu:~$ cd c_enviroment ubuntu@ubuntu:~/c_enviroment$ ls Makefile hardware libraries output sample Now run make to make the libraries and the examples with the following command: ubuntu@ubuntu:~/c_enviroment$ make Make[1]: Leaving directory `/home/ubuntu/c_enviroment/sample' The resulting binary files are found in the output/test folder ubuntu@ubuntu:~/c_enviroment$ cd output/test ubuntu@ubuntu:~/c_enviroment/output/test$ ll total 660 drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 27 06:59 ./ drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 27 06:49 ../ -rwxrwxr-x 1 ubuntu ubuntu 13868 Apr 27 06:58 adc_test* -rwxrwxr-x 1 ubuntu ubuntu 28284 Apr 27 06:58 adxl345_test* -rwxrwxr-x 1 ubuntu ubuntu 14209 Apr 27 06:58 interrupt_test* -rwxrwxr-x 1 ubuntu ubuntu 13726 Apr 27 06:58 io_test* -rwxrwxr-x 1 ubuntu ubuntu 13712 Apr 27 06:59 linker_button_test* -rwxrwxr-x 1 ubuntu ubuntu 13907 Apr 27 06:59 linker_buzzer_test* -rwxrwxr-x 1 ubuntu ubuntu 13689 Apr 27 06:59 linker_hall_sensor_test* -rwxrwxr-x 1 ubuntu ubuntu 13760 Apr 27 06:59 linker_joystick_test* -rwxrwxr-x 1 ubuntu ubuntu 13769 Apr 27 06:59 linker_led_bar_test* -rwxrwxr-x 1 ubuntu ubuntu 13690 Apr 27 06:59 linker_led_test* -rwxrwxr-x 1 ubuntu ubuntu 14290 Apr 27 06:59 linker_light_sensor_test* ““
  • 13. C Command line To view the contents of a sample sketch, (this example we’ll look at the contents of linker_led_test.c) type: ubuntu@ubuntu:~/c_enviroment/sample$ cat linker_led_test.c /* * LED test program */ #include <core.h> int led_pin = 1; void setup() { if(argc != 2){ goto _help; } led_pin = atoi(argv[1]); if((led_pin < 0) || (led_pin > 13)){ goto _help; } pinMode(led_pin, OUTPUT); return; _help: printf("Usage %s LED_PIN_NUM(0-13)n", argv[0]); exit(-1); } void loop() { digitalWrite(led_pin, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(led_pin, LOW); // set the LED off delay(1000); // wait for a second }
  • 14. Creating Your Own Sketch ubuntu@ubuntu:~/c_enviroment/sample$ nano button_led.c An empty nano screen should appear. Copy and paste the following code into it. (Remember to paste in nano at the cursor, just right click the mouse button). #include <core.h> // Required first line to run on pcDuino int ledPin = 8; int buttonPin = 7; // variables will change: int buttonState = 0; // variable for reading the pushbutton status void setup() { // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); // initialize the pushbutton pin as an input: pinMode(buttonPin, INPUT); }
  • 15. Creating Your Own Sketch void loop(){ // read the state of the pushbutton value: buttonState = digitalRead(buttonPin); // check if the pushbutton is pressed. // if it is, the buttonState is HIGH: if (buttonState == HIGH) { // turn LED on: digitalWrite(ledPin, HIGH); } else { // turn LED off: digitalWrite(ledPin, LOW); } }
  • 16. Creating Your Own Sketch Modify the Makefile and Compile ubuntu@ubuntu:~/c_enviroment/sample$ nano Makefile You will see a section that lists all the OBJS something like: OBJS = io_test adc_test pwm_test spi_test adxl345_test serial_test liquidcrystal_i2c liquidcrystal_spi interrupt_test tone_test OBJS += linker_led_test linker_potentiometer_test linker_tilt_test linker_light_sensor_test linker_button_test OBJS += linker_touch_sensor_test linker_magnetic_sensor_test linker_temperature_sensor_test linker_joystick_test OBJS += linker_rtc_test linker_sound_sensor_test linker_buzzer_test linker_hall_sensor_test linker_led_bar_test linker_relay_test OBJS += pn532_readAllMemoryBlocks pn532readMifareMemory pn532readMifareTargetID pn532writeMifareMemory
  • 17. Creating Your Own Sketch We’re going to add a line to the end of this with the name of the scketch we just created: OBJS += button_led Save the file and exit nano using <CTRL>X with a y and <enter>. We now run make by typing: ubuntu@ubuntu:~/c_enviroment/sample$ make You should see a whole bunch of text with the end being: button_led.c -o ../output/test/button_led ../libarduino.a If all went well, you can go to the output/test folder and find your executable you have created: ubuntu@ubuntu:~/c_enviroment/sample$ cd ../output/test/ ubuntu@ubuntu:~/c_enviroment/output/test$ ll total 676 drwxrwxr-x 2 ubuntu ubuntu 4096 Apr 27 07:51 ./ drwxrwxr-x 3 ubuntu ubuntu 4096 Apr 27 06:49 ../ -rwxrwxr-x 1 ubuntu ubuntu 13868 Apr 27 07:51 adc_test* -rwxrwxr-x 1 ubuntu ubuntu 28284 Apr 27 07:51 adxl345_test* -rwxrwxr-x 1 ubuntu ubuntu 13668 Apr 27 07:51 button_led* “..(not showing rest of listing here)
  • 18. Creating Your Own Sketch Run Your Sketch To run it, once you have wired up a switch and led to the right pins, type: ubuntu@ubuntu:~/c_enviroment/output/test$ ./button_led To stop the program, <Ctrl>C A Quick Re-Cap Add #include <core.h> to the top of your sketch. Create your sketch in the samples folder (if your familiar with linux, makefiles, and compiling code, you could set up your own) Add the filename to the Makefile in the samples folder in the OBJS section without the .c Run make Run the executable from the output/test folder. You can introduce command line arguments into your sketch to make it more transportable.
  • 33. Digital Humidity and Temperature Sensor
  • 35. Serial Port of pcDuino
  • 36. Extends to 4 UARTS http://jbvsblog.blogspot.com/2013/09/pcduino-extends-to-4uarts.html
  • 40. Relay
  • 46. Python ubuntu@ubuntu:~/python-pcduino/Samples/blink_led$ more blink_led.py #!/usr/bin/env python # blink_led.py # gpio test code for pcduino ( http://www.pcduino.com ) # import gpio import time led_pin = "gpio2" def delay(ms): time.sleep(1.0*ms/1000) def setup(): gpio.pinMode(led_pin, gpio.OUTPUT) def loop(): while(1): gpio.digitalWrite(led_pin, gpio.HIGH) delay(200)
  • 48. OpenCV def process(infile): image = cv.LoadImage(infile); if image: faces = detect_object(image) im = Image.open(infile) path = os.path.abspath(infile) save_path = os.path.splitext(path)[0]+"_face" try: os.mkdir(save_path) except: pass if faces: draw = ImageDraw.Draw(im) count = 0 for f in faces: count += 1 draw.rectangle(f, outline=(255, 0, 0)) a = im.crop(f) file_name = os.path.join(save_path,str(count)+".jpg") # print file_name a.save(file_name) drow_save_path = os.path.join(save_path,"out.jpg") im.save(drow_save_path, "JPEG", quality=80) else: print "Error: cannot detect faces on %s" % infile if __name__ == "__main__": process("./opencv_in.jpg")
  • 49. OpenCV #!/usr/bin/env python #coding=utf-8 import os from PIL import Image, ImageDraw import cv def detect_object(image): grayscale = cv.CreateImage((image.width, image.height), 8, 1) cv.CvtColor(image, grayscale, cv.CV_BGR2GRAY) cascade = cv.Load("/usr/share/opencv/haarcascades/haarcascade_frontalface_alt_tree.xml") rect = cv.HaarDetectObjects(grayscale, cascade, cv.CreateMemStorage(), 1.1, 2, cv.CV_HAAR_DO_CANNY_PRUNING, (20,20)) result = [] for r in rect: result.append((r[0][0], r[0][1], r[0][0]+r[0][2], r[0][1]+r[0][3])) return result
  • 50. Cloud 9 IDE   Cloud9 IDE is an online development environment for Javascript and Node.js applications as well as HTML, CSS, PHP, Java, Ruby and 23 other languages. You're programming for the web, on the web. Teams can collaborate on projects and run them within the browser. When you're finished, deploy it—and you're done!
  • 54. Scratch $sudo apt-get install pcduino-scratch
  • 55. Go Lang package main import ( "fmt" "./gpio" "time" ) func main() { g, err := gpio.NewGPIOLine(7,gpio.OUT) if err != nil { fmt.Printf("Error setting up GPIO %v: %v", 18, err) return } blink(g, 100) g.Close() } func blink(g *gpio.GPIOLine, n uint) { fmt.Printf("blinking %v time(s)n", n) for i := uint(0); i &lt; n; i++ { g.SetState(true) time.Sleep(time.Duration(1000) * time.Millisecond) g.SetState(false) time.Sleep(time.Duration(1000) * time.Millisecond) } }
  • 56. Home Automation:IP controllable LED  Many users are asking if the hardware part can be programmed together with the Ubuntu linux?  Sure. This is the beauty of pcDuino. The Arduino compatible hardware is a native part of the OS.  pcDuino includes Ethernet port, USB Wifi dongle, so there is no need for Ethernet shield, Ethernet shield , USB host shield, MP3 shields and so on. Now, we are going to implement a TCP/IP socket server on pcDuino to listen to the data coming from client. When it turn on it will receive receives character ’O', it will the LED, and when it receives ‘F‛, turn on the LED. No actions if something else.
  • 57. Home Automation:IP controllable LED #include ‚sys/socket.h‛ #include ‚netinet/in.h‛ #include ‚arpa/inet.h‛ #include ‚sys/types.h‛ void loop() { n = read(connfd, sendBuff, strlen(sendBuff) ); int led_pin = 2; int listenfd = 0, connfd = 0; int n; struct sockaddr_in serv_addr; char sendBuff[1025]; time_t ticks; if(n>0) { if(sendBuff[0]=='O') digitalWrite(led_pin, HIGH); // set the LED on if(sendBuff[0]=='F') digitalWrite(led_pin,LOW); // set the LED off } } void setup() { led_pin = 2; pinMode(led_pin, OUTPUT); listenfd = socket(AF_INET, SOCK_STREAM, 0); memset(serv_addr, '0', sizeof(serv_addr)); memset(sendBuff, '0', sizeof(sendBuff)); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = htonl(INADDR_ANY); serv_addr.sin_port = htons(5000); bind(listenfd, (struct sockaddr*) serv_addr, sizeof(serv_addr)); listen(listenfd, 10); connfd = accept(listenfd, (struct sockaddr*)NULL, NULL); }
  • 59. pcDuino as 3D printer control console
  • 62. Two flavors to program under Android  There are two flavors to program under Android:   Command line QT5 GUI
  • 64. QT5 GUI We can copy the apk though pcDuino OTG or SD card to pcDunio and install it there.
  • 65.
  • 66. Friends help Friends    Friends help Friends - PCB Friends help Friends - Assembly Friends help Friends -Distribution Leverage LinkSprite Manufacturing Facility in Shenzhen, China, and distribution channel worldwide.