Lscd

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Details)
 
(11 intermediate revisions by one user not shown)
Line 1: Line 1:
 +
[[Image:RIMG0008-1.JPG|300px]] [[Image:RIMG0007-1.JPG|300px]]
 +
 +
{{Note|Homepage http://code.google.com/p/lscd/}}
 
==PlayWithFreerunner  ==
 
==PlayWithFreerunner  ==
  
Line 20: Line 23:
 
:a.1 Using OE: the bb file is at
 
:a.1 Using OE: the bb file is at
  
* The compiled opk file: http://lscd.googlecode.com/files/liblscd0_armv4t.opk
+
** The compiled opk file: http://lscd.googlecode.com/files/liblscd0_armv4t.opk
* ssh to neo then:
+
** ssh to neo then:
  
  # wget http://lscd.googlecode.com/files/liblscd0_armv4t.opk
+
  wget http://lscd.googlecode.com/files/liblscd0_armv4t.opk
  
  # opkg install liblscd0_armv4t.opk  
+
  opkg install liblscd0_armv4t.opk  
  
 
:a.2 Cross compile:
 
:a.2 Cross compile:
  
* You will need cross-compiler, cython, pyrex
+
** You will need cross-compiler, cython, pyrex
* svn checkout http://lscd.googlecode.com/svn/trunk/ lscd
+
** svn checkout http://lscd.googlecode.com/svn/trunk/ lscd
* cd lscd; ./autogen --host=arm-angstrom-linux-gnueabi --prefix=/usr
+
** cd lscd; ./autogen --host=arm-angstrom-linux-gnueabi --prefix=/usr
* mkdir temp; env DESTDIR=pwd/temp make install
+
** mkdir temp; env DESTDIR=pwd/temp make install
* cd temp; scp -r usr root@192.168.0.202:
+
** cd temp; scp -r usr root@192.168.0.202:
  
 
  {note|Neo's default IP is 192.168.0.202 }
 
  {note|Neo's default IP is 192.168.0.202 }
  
2. connect to Neo other than USB network.
+
# connect to Neo other than USB network.
  
 
:a.1 Via Wifi
 
:a.1 Via Wifi
  
* http://wiki.openmoko.org/wiki/Wifi  
+
** http://wiki.openmoko.org/wiki/Wifi  
  
 
:a.2 Via Bluetooth
 
:a.2 Via Bluetooth
  
* http://wiki.openmoko.org/wiki/Bt-net-script  
+
** http://wiki.openmoko.org/wiki/Bt-net-script  
  
3. connect Neo with LSC-10 chip
+
#connect Neo with LSC-10 chip
  
* LSC chip has USB B type female interface, therefore all we have to do is finding a USB line with mini USB type A male head and USB type B male head.
+
** LSC chip has USB B type female interface, therefore all we have to do is finding a USB line with mini USB type A male head and USB type B male head.
* You can also assemble few lines together. For example I used:
+
** You can also assemble few lines together. For example I used:
  
 
           mini USB male
 
           mini USB male
 
 
           <---->
 
           <---->
  
 
           USB A male | USB A female
 
           USB A male | USB A female
 
 
           <---->
 
           <---->
  
 
           USB A female | USB A male
 
           USB A female | USB A male
 
 
           <---->
 
           <---->
  
Line 68: Line 68:
 
           to assemble this line.  
 
           to assemble this line.  
  
4. Switch Neo to USB host mode
+
# Switch Neo to USB host mode
  
 
     * Neo is default on USB device mode, and if you want to control something with Neo you will have to switch it to host mode.  
 
     * Neo is default on USB device mode, and if you want to control something with Neo you will have to switch it to host mode.  
Line 76: Line 76:
 
   3. echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode  
 
   3. echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode  
  
     * of course you can write them in script  
+
     ** of course you can write them in script  
  
5. Play with LSC chip with python binding
+
# Play with LSC chip with python binding
  
     * you may take http://code.google.com/p/lscd/source/browse/trunk/tests/robot.py or http://code.google.com/p/lscd/source/browse/trunk/tests/pylsc_init.py as examples  
+
     ** you may take http://code.google.com/p/lscd/source/browse/trunk/tests/robot.py or http://code.google.com/p/lscd/source/browse/trunk/tests/pylsc_init.py as examples  
  
 
Pylsc is python binding. You can for sure using C code to control the LSC chip. And you can write script for this very easily.
 
Pylsc is python binding. You can for sure using C code to control the LSC chip. And you can write script for this very easily.
  
Happy Hacking.
 
 
Comment by ticktock35, Nov 10, 2008
 
  
 
Pictures: http://picasaweb.google.com/ticktock35/NeoLSCRobot#
 
Pictures: http://picasaweb.google.com/ticktock35/NeoLSCRobot#
  
 
Videos: http://tw.youtube.com/watch?v=SG3fAHFNs2c
 
Videos: http://tw.youtube.com/watch?v=SG3fAHFNs2c
 +
 +
[[category:Applications]]

Latest revision as of 10:30, 8 December 2008

RIMG0008-1.JPG RIMG0007-1.JPG

NOTE: Homepage http://code.google.com/p/lscd/


Contents

[edit] PlayWithFreerunner

[edit] How to play LSCD with Neo Freerunner

[edit] Introduction

In this page we will discuss how to play LSCD with Neo Freerunner. Neo Freerunner is a Linux programmable cell phone from Openmoko.

It has:

  • mini usb,
  • wifi,
  • bluetooth,
  • GPS,
  • GSM,
  • GPRS,
  • and 2 3D accelerometers.

[edit] Details

  1. cross compile LSCD.
a.1 Using OE: the bb file is at
wget http://lscd.googlecode.com/files/liblscd0_armv4t.opk
opkg install liblscd0_armv4t.opk 
a.2 Cross compile:
    • You will need cross-compiler, cython, pyrex
    • svn checkout http://lscd.googlecode.com/svn/trunk/ lscd
    • cd lscd; ./autogen --host=arm-angstrom-linux-gnueabi --prefix=/usr
    • mkdir temp; env DESTDIR=pwd/temp make install
    • cd temp; scp -r usr root@192.168.0.202:
{note|Neo's default IP is 192.168.0.202 }
  1. connect to Neo other than USB network.
a.1 Via Wifi
a.2 Via Bluetooth
  1. connect Neo with LSC-10 chip
    • LSC chip has USB B type female interface, therefore all we have to do is finding a USB line with mini USB type A male head and USB type B male head.
    • You can also assemble few lines together. For example I used:
         mini USB male
         <---->
         USB A male | USB A female
         <---->
         USB A female | USB A male
         <---->
         USB B male 
         to assemble this line. 
  1. Switch Neo to USB host mode
   * Neo is default on USB device mode, and if you want to control something with Neo you will have to switch it to host mode. 
  1. ifconfig usb0 down
  2. echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode
  3. echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode 
   ** of course you can write them in script 
  1. Play with LSC chip with python binding
   ** you may take http://code.google.com/p/lscd/source/browse/trunk/tests/robot.py or http://code.google.com/p/lscd/source/browse/trunk/tests/pylsc_init.py as examples 

Pylsc is python binding. You can for sure using C code to control the LSC chip. And you can write script for this very easily.


Pictures: http://picasaweb.google.com/ticktock35/NeoLSCRobot#

Videos: http://tw.youtube.com/watch?v=SG3fAHFNs2c

Personal tools

PlayWithFreerunner

How to play LSCD with Neo Freerunner

Introduction

In this page we will discuss how to play LSCD with Neo Freerunner. Neo Freerunner is a Linux programmable cell phone from Openmoko.

It has:

  • mini usb,
  • wifi,
  • bluetooth,
  • GPS,
  • GSM,
  • GPRS,
  • and 2 3D accelerometers.

Details

  1. cross compile LSCD.
a.1 Using OE: the bb file is at
# wget http://lscd.googlecode.com/files/liblscd0_armv4t.opk
# opkg install liblscd0_armv4t.opk 
a.2 Cross compile:
  • You will need cross-compiler, cython, pyrex
  • svn checkout http://lscd.googlecode.com/svn/trunk/ lscd
  • cd lscd; ./autogen --host=arm-angstrom-linux-gnueabi --prefix=/usr
  • mkdir temp; env DESTDIR=pwd/temp make install
  • cd temp; scp -r usr root@192.168.0.202:
{note|Neo's default IP is 192.168.0.202 }

2. connect to Neo other than USB network.

a.1 Via Wifi
a.2 Via Bluetooth

3. connect Neo with LSC-10 chip

  • LSC chip has USB B type female interface, therefore all we have to do is finding a USB line with mini USB type A male head and USB type B male head.
  • You can also assemble few lines together. For example I used:
         mini USB male
         <---->
         USB A male | USB A female
         <---->
         USB A female | USB A male
         <---->
         USB B male 
         to assemble this line. 

4. Switch Neo to USB host mode

   * Neo is default on USB device mode, and if you want to control something with Neo you will have to switch it to host mode. 
  1. ifconfig usb0 down
  2. echo "host" > /sys/devices/platform/s3c2410-ohci/usb_mode
  3. echo "1" > /sys/devices/platform/neo1973-pm-host.0/hostmode 
   * of course you can write them in script 

5. Play with LSC chip with python binding

   * you may take http://code.google.com/p/lscd/source/browse/trunk/tests/robot.py or http://code.google.com/p/lscd/source/browse/trunk/tests/pylsc_init.py as examples 

Pylsc is python binding. You can for sure using C code to control the LSC chip. And you can write script for this very easily.

Happy Hacking.

Comment by ticktock35, Nov 10, 2008

Pictures: http://picasaweb.google.com/ticktock35/NeoLSCRobot#

Videos: http://tw.youtube.com/watch?v=SG3fAHFNs2c