SlideShare a Scribd company logo
Development of Programming
   Environment for LEGO
 Mindstorms NXT by Yampa


          Takahiro Ebana
     Supervised by Taro Suzuki

       University of Aizu
Basic knowledges

○Reactive Programming
 A programming method that dynamic react to changes of
 various informations such as input from user or the
 progress of time.

○FRP
 a technique to perform Reactive programming with a
 functional language.
 - Yampa is a FRP language based on Haskell.

○LEGO Mindstorms NXT
 the robot teaching material sold by LEGO company.
Background
○Why do I use Yampa?
 - An FRP language is not so really used
 - To show the example which I used an FRP
   language for
 ・

○Why do I use LEGO Mindstorms NXT as a control  
 object?
 - To cancel difficulty of errand of the control that
  I used bluetooth for
Design of programming environment:
            process flow
Process flow step in a time unit:
 1, Get input data from LEGO Mindstorms NXT.
 2, Convert input data to NXTInput.
 3, I hand NXTInput to signal function and run signal
   function.
 4, Convert NXTOutput to direct commands.
 5, Send direct command to LEGO Mindstorms NXT.
 6, Go next time unit(Back to step 1).

A program implemented in Yampa is repetition of this
processing.
Design of programming environment:
    data structure and modules
Data types
・NXTInput
 - The data type that has input from NXT
・NXTOutput
 - The data type that has a parameter to transmit to
   NXT
・SF NXTInput NXTOutput
 - The data type of the main body of program that a   user
 makes in this programming environment

Modules
・NXTMain
 - The centor of this programming environment
・NXTMotorInput/Output, NXTSensorInput
 - Control NXT motor and sensor
Implemantation:
  Run and stop signal function
These functions implemented in NXTMain.

・runNXTProgram
 - This function process 3 step:
  1, Connect NXT by bluetooth.
  2, Run signal function (maked user).
  3, Off bluetooth connect.

・endNXTProgram
 - The process of signal function is an infinite loop.
 - When user want to terminate signal function, use this.
Implementation : input

About a function to get input from a motor and a sensor.

The function to get input from LEGO Mindstorms NXT is signal
 function basically.
 - For example : SF NXTInput Int

There are two types of functions to acquire the input from
 motor and sensor.
 - Get input from a motor or sensor which specified a port
   number for the cause
 - Get input from a motor which specified a kind of motor or
   sensor for the cause.
Implementation : output
The output function performs the output to the motor mainly.

There is the case that is not so when the output function is
 Signal function.
 - There does not need to be it in signal function if they do
   not change output by time.

The procedure of the movement of the output function when I
 considered NXT to be a car is as follows.
 1, Get input data from left and right wheel.
 2, calculation
 3, Return output data (NXTOutput)
Because the function to acquire input is signal function, also
 this function is signal function.
Conclusions

I implemented a function that worked to run of a SF. By this
function, user can make efforts in only making of signal
function.
  Also I implemented any functions to operate motor and
sensor easily. By these functions, user can treat motor and
sensor without being conscious of a direct command.

Functions that I implemented this research tend to be basic
function.
 - It seems that I can build the programming environment
   that is easy to use more by adding more progressive
   functions.

More Related Content

Viewers also liked

El tenedor 1
El tenedor 1El tenedor 1
El tenedor 1
vlg1988
 
Facilitating semantic alignment.-biohackathon-jupp
Facilitating semantic alignment.-biohackathon-juppFacilitating semantic alignment.-biohackathon-jupp
Facilitating semantic alignment.-biohackathon-jupp
Simon Jupp
 
2010 蓮社文化教育
2010 蓮社文化教育2010 蓮社文化教育
2010 蓮社文化教育
永翎 石
 
Buku kerja-pengawas-sekolah (1)
Buku kerja-pengawas-sekolah (1)Buku kerja-pengawas-sekolah (1)
Buku kerja-pengawas-sekolah (1)Adji Marsose
 
2010 法會剪影
2010 法會剪影2010 法會剪影
2010 法會剪影
永翎 石
 
Snr sem presentation
Snr sem presentationSnr sem presentation
Snr sem presentation
dankang93
 
2010 蓮社特別活動
2010 蓮社特別活動2010 蓮社特別活動
2010 蓮社特別活動永翎 石
 
Tw2010week7 s1150036
Tw2010week7 s1150036Tw2010week7 s1150036
Tw2010week7 s1150036
s1150036
 
Journey Qual IDI Training Preso_4.2.12
Journey Qual IDI Training Preso_4.2.12Journey Qual IDI Training Preso_4.2.12
Journey Qual IDI Training Preso_4.2.12
Gaurav Joshi
 
Portfolio
PortfolioPortfolio
Portfolio
wilenfoto
 
Critical thinking
Critical thinkingCritical thinking
Critical thinking
mauriceward
 
El tenedor 1
El tenedor 1El tenedor 1
El tenedor 1
vlg1988
 
Games for sale - Korea
Games for sale - KoreaGames for sale - Korea
Games for sale - Korea
tonychan1972
 
El tenedor 1
El tenedor 1El tenedor 1
El tenedor 1
vlg1988
 
How to Talk to Girls 101 (YV)
How to Talk to Girls 101 (YV)How to Talk to Girls 101 (YV)
How to Talk to Girls 101 (YV)
hambergerhead
 
Coco1(2)
Coco1(2)Coco1(2)
Coco1(2)
claudiadocampo
 
Ateliers commercants acv-ucm-acia #5
Ateliers commercants acv-ucm-acia #5Ateliers commercants acv-ucm-acia #5
Ateliers commercants acv-ucm-acia #5
Laurent ANNET ☆ WSI Marketing Digital
 
Guide de l'intelligence économique 2012 (Guide du routard)
Guide de l'intelligence économique 2012 (Guide du routard)Guide de l'intelligence économique 2012 (Guide du routard)
Guide de l'intelligence économique 2012 (Guide du routard)
benj_2
 

Viewers also liked (19)

El tenedor 1
El tenedor 1El tenedor 1
El tenedor 1
 
Facilitating semantic alignment.-biohackathon-jupp
Facilitating semantic alignment.-biohackathon-juppFacilitating semantic alignment.-biohackathon-jupp
Facilitating semantic alignment.-biohackathon-jupp
 
2010 蓮社文化教育
2010 蓮社文化教育2010 蓮社文化教育
2010 蓮社文化教育
 
Buku kerja-pengawas-sekolah (1)
Buku kerja-pengawas-sekolah (1)Buku kerja-pengawas-sekolah (1)
Buku kerja-pengawas-sekolah (1)
 
2010 法會剪影
2010 法會剪影2010 法會剪影
2010 法會剪影
 
Snr sem presentation
Snr sem presentationSnr sem presentation
Snr sem presentation
 
2010 蓮社特別活動
2010 蓮社特別活動2010 蓮社特別活動
2010 蓮社特別活動
 
Tw2010week7 s1150036
Tw2010week7 s1150036Tw2010week7 s1150036
Tw2010week7 s1150036
 
Journey Qual IDI Training Preso_4.2.12
Journey Qual IDI Training Preso_4.2.12Journey Qual IDI Training Preso_4.2.12
Journey Qual IDI Training Preso_4.2.12
 
Portfolio
PortfolioPortfolio
Portfolio
 
Critical thinking
Critical thinkingCritical thinking
Critical thinking
 
El tenedor 1
El tenedor 1El tenedor 1
El tenedor 1
 
Games for sale - Korea
Games for sale - KoreaGames for sale - Korea
Games for sale - Korea
 
El tenedor 1
El tenedor 1El tenedor 1
El tenedor 1
 
How to Talk to Girls 101 (YV)
How to Talk to Girls 101 (YV)How to Talk to Girls 101 (YV)
How to Talk to Girls 101 (YV)
 
Nilai moral & kartun
Nilai moral & kartunNilai moral & kartun
Nilai moral & kartun
 
Coco1(2)
Coco1(2)Coco1(2)
Coco1(2)
 
Ateliers commercants acv-ucm-acia #5
Ateliers commercants acv-ucm-acia #5Ateliers commercants acv-ucm-acia #5
Ateliers commercants acv-ucm-acia #5
 
Guide de l'intelligence économique 2012 (Guide du routard)
Guide de l'intelligence économique 2012 (Guide du routard)Guide de l'intelligence économique 2012 (Guide du routard)
Guide de l'intelligence économique 2012 (Guide du routard)
 

Similar to Tw2010slide2

OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonOSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
NETWAYS
 
Introduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXTIntroduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXT
Wayne Hamilton
 
Python functional programming
Python functional programmingPython functional programming
Python functional programming
Geison Goes
 
Neural_Programmer_Interpreter
Neural_Programmer_InterpreterNeural_Programmer_Interpreter
Neural_Programmer_Interpreter
Katy Lee
 
Analysing in depth work manager
Analysing in depth work managerAnalysing in depth work manager
Analysing in depth work manager
lpu
 
Desktop Based Voice Assistant Application Using Machine Learning Approach
Desktop Based Voice Assistant Application Using Machine Learning ApproachDesktop Based Voice Assistant Application Using Machine Learning Approach
Desktop Based Voice Assistant Application Using Machine Learning Approach
IRJET Journal
 
Neural Field aware Factorization Machine
Neural Field aware Factorization MachineNeural Field aware Factorization Machine
Neural Field aware Factorization Machine
InMobi
 
Ai final ppt with InMobi template
Ai  final ppt with InMobi templateAi  final ppt with InMobi template
Ai final ppt with InMobi template
Gunjan Sharma
 
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonOSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
NETWAYS
 
Background Processing With Work Manager
Background Processing With Work ManagerBackground Processing With Work Manager
Background Processing With Work Manager
Seven Peaks Speaks
 
Bitcoin Price Prediction
Bitcoin Price PredictionBitcoin Price Prediction
Bitcoin Price Prediction
Kadambini Indurkar
 
V2.0 open power ai virtual university deep learning and ai introduction
V2.0 open power ai virtual university   deep learning and ai introductionV2.0 open power ai virtual university   deep learning and ai introduction
V2.0 open power ai virtual university deep learning and ai introduction
Ganesan Narayanasamy
 
Distributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflowDistributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflow
Emanuel Di Nardo
 
Deep learning crash course
Deep learning crash courseDeep learning crash course
Deep learning crash course
Vishwas N
 
Ase02.ppt
Ase02.pptAse02.ppt
Understanding concurrency
Understanding concurrencyUnderstanding concurrency
Understanding concurrency
Anshul Sharma
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processing
Gabor Paller
 
Programming Methodologies Functions - C Language
Programming Methodologies Functions - C LanguageProgramming Methodologies Functions - C Language
Programming Methodologies Functions - C Language
ChobodiDamsaraniPadm
 
Weekly report template (3)
Weekly report template (3)Weekly report template (3)
Weekly report template (3)
silverbrb
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
slandelle
 

Similar to Tw2010slide2 (20)

OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas EricssonOSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
 
Introduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXTIntroduction to robotics part 1 (Lego NXT
Introduction to robotics part 1 (Lego NXT
 
Python functional programming
Python functional programmingPython functional programming
Python functional programming
 
Neural_Programmer_Interpreter
Neural_Programmer_InterpreterNeural_Programmer_Interpreter
Neural_Programmer_Interpreter
 
Analysing in depth work manager
Analysing in depth work managerAnalysing in depth work manager
Analysing in depth work manager
 
Desktop Based Voice Assistant Application Using Machine Learning Approach
Desktop Based Voice Assistant Application Using Machine Learning ApproachDesktop Based Voice Assistant Application Using Machine Learning Approach
Desktop Based Voice Assistant Application Using Machine Learning Approach
 
Neural Field aware Factorization Machine
Neural Field aware Factorization MachineNeural Field aware Factorization Machine
Neural Field aware Factorization Machine
 
Ai final ppt with InMobi template
Ai  final ppt with InMobi templateAi  final ppt with InMobi template
Ai final ppt with InMobi template
 
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas EricssonOSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
OSMC 2014 | Naemon 1, 2, 3, N by Andreas Ericsson
 
Background Processing With Work Manager
Background Processing With Work ManagerBackground Processing With Work Manager
Background Processing With Work Manager
 
Bitcoin Price Prediction
Bitcoin Price PredictionBitcoin Price Prediction
Bitcoin Price Prediction
 
V2.0 open power ai virtual university deep learning and ai introduction
V2.0 open power ai virtual university   deep learning and ai introductionV2.0 open power ai virtual university   deep learning and ai introduction
V2.0 open power ai virtual university deep learning and ai introduction
 
Distributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflowDistributed implementation of a lstm on spark and tensorflow
Distributed implementation of a lstm on spark and tensorflow
 
Deep learning crash course
Deep learning crash courseDeep learning crash course
Deep learning crash course
 
Ase02.ppt
Ase02.pptAse02.ppt
Ase02.ppt
 
Understanding concurrency
Understanding concurrencyUnderstanding concurrency
Understanding concurrency
 
Advantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processingAdvantages and limitations of PhoneGap for sensor processing
Advantages and limitations of PhoneGap for sensor processing
 
Programming Methodologies Functions - C Language
Programming Methodologies Functions - C LanguageProgramming Methodologies Functions - C Language
Programming Methodologies Functions - C Language
 
Weekly report template (3)
Weekly report template (3)Weekly report template (3)
Weekly report template (3)
 
Gatling - Bordeaux JUG
Gatling - Bordeaux JUGGatling - Bordeaux JUG
Gatling - Bordeaux JUG
 

Tw2010slide2

  • 1. Development of Programming Environment for LEGO Mindstorms NXT by Yampa Takahiro Ebana Supervised by Taro Suzuki University of Aizu
  • 2. Basic knowledges ○Reactive Programming  A programming method that dynamic react to changes of various informations such as input from user or the progress of time. ○FRP  a technique to perform Reactive programming with a functional language.  - Yampa is a FRP language based on Haskell. ○LEGO Mindstorms NXT  the robot teaching material sold by LEGO company.
  • 3. Background ○Why do I use Yampa?  - An FRP language is not so really used  - To show the example which I used an FRP language for ・ ○Why do I use LEGO Mindstorms NXT as a control    object?  - To cancel difficulty of errand of the control that   I used bluetooth for
  • 4. Design of programming environment: process flow Process flow step in a time unit:  1, Get input data from LEGO Mindstorms NXT.  2, Convert input data to NXTInput.  3, I hand NXTInput to signal function and run signal   function.  4, Convert NXTOutput to direct commands.  5, Send direct command to LEGO Mindstorms NXT.  6, Go next time unit(Back to step 1). A program implemented in Yampa is repetition of this processing.
  • 5. Design of programming environment: data structure and modules Data types ・NXTInput  - The data type that has input from NXT ・NXTOutput  - The data type that has a parameter to transmit to NXT ・SF NXTInput NXTOutput  - The data type of the main body of program that a   user makes in this programming environment Modules ・NXTMain  - The centor of this programming environment ・NXTMotorInput/Output, NXTSensorInput  - Control NXT motor and sensor
  • 6. Implemantation: Run and stop signal function These functions implemented in NXTMain. ・runNXTProgram  - This function process 3 step:   1, Connect NXT by bluetooth.   2, Run signal function (maked user).   3, Off bluetooth connect. ・endNXTProgram  - The process of signal function is an infinite loop.  - When user want to terminate signal function, use this.
  • 7. Implementation : input About a function to get input from a motor and a sensor. The function to get input from LEGO Mindstorms NXT is signal function basically.  - For example : SF NXTInput Int There are two types of functions to acquire the input from motor and sensor.  - Get input from a motor or sensor which specified a port number for the cause  - Get input from a motor which specified a kind of motor or sensor for the cause.
  • 8. Implementation : output The output function performs the output to the motor mainly. There is the case that is not so when the output function is Signal function.  - There does not need to be it in signal function if they do not change output by time. The procedure of the movement of the output function when I considered NXT to be a car is as follows.  1, Get input data from left and right wheel.  2, calculation  3, Return output data (NXTOutput) Because the function to acquire input is signal function, also this function is signal function.
  • 9. Conclusions I implemented a function that worked to run of a SF. By this function, user can make efforts in only making of signal function. Also I implemented any functions to operate motor and sensor easily. By these functions, user can treat motor and sensor without being conscious of a direct command. Functions that I implemented this research tend to be basic function. - It seems that I can build the programming environment that is easy to use more by adding more progressive functions.