element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
PiCasso Design Challenge
  • Challenges & Projects
  • Design Challenges
  • PiCasso Design Challenge
  • More
  • Cancel
PiCasso Design Challenge
Blog Trigger a Sketch at the Command Line
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: armour999
  • Date Created: 4 May 2019 6:18 PM Date Created
  • Views 804 views
  • Likes 6 likes
  • Comments 2 comments
Related
Recommended

Trigger a Sketch at the Command Line

armour999
armour999
4 May 2019

My original idea was to trigger a event if a door was open or closed. Depending on the event this would determine if a sketch would be played. So who should I impress with this idea ? Well Jim the cat is receiving a tent this weekend and I know she loves to follow the cursor on my laptop. As most cats she loves to lay on my keyboard and does not care if I cannot work. I talked to her about the design and this is her reaction.

image

Not to worry Jim. I know she might enjoy Optical Illusions from processing when she enters her tent. But now to the more technical challenges.

 


image

 

image

 

I am using Enocean Pi to sense if a door has been opened or closed. I also installed FHEM for testing.  The actuator is a reed or contact sensor. No batteries required or wiring for Enocean sensors. I installed FHEM

 

sudo apt-get install perl libdevice-serialport-perl libio-socket-ssl-perl libwww-perl

sudo apt-get install -f

wget http://fhem.de/fhem-5.7.deb

sudo dpkg –i fhem-5.7.deb

 

After some digging I did get the Enocean Pi to appear on FHEM. The link is here.

 

image

I have Enocean talking to the Reed Sensor and letting me know if a door is closed or open.

 

I was also able to add PiFace  to FHEM .

 

image

The next step is getting processing sketch to activate the processing sketch on the command line in Python. The install steps can be found here.

 

I downloaded processing.py-linus64.tgz on my laptop and transferred  the file to the Pi using Pizilla. From the instructions I set up a simple script to see if I could run it at the command line:

 

mouse_follow.py 

def setup():

    size(400, 400)

 

def draw():

    background(255)

    fill(0)

    ellipse(mouseX, mouseY, 50, 50)

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

 

 

 


 

  • Sign in to reply

Top Comments

  • DAB
    DAB over 6 years ago +1
    Good update. I like your step by step approach. It always works and you learn a lot from each step. DAB
  • DAB
    DAB over 6 years ago

    Good update.

     

    I like your step by step approach. It always works and you learn a lot from each step.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • genebren
    genebren over 6 years ago

    Great steps on your project.  Keep up the good work!

     

    Gene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube