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
    About the element14 Community
  • 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
Smarter Life
  • Challenges & Projects
  • Design Challenges
  • Smarter Life
  • More
  • Cancel
Smarter Life
Blog Smart Life Challenge: GeoCar quick update On the line (online!)
  • Blog
  • Forum
  • Documents
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: camuyano
  • Date Created: 11 Dec 2013 10:57 AM Date Created
  • Views 866 views
  • Likes 0 likes
  • Comments 3 comments
  • smartlife
  • psoc4
  • smarter_life_challenge
  • gecar
  • open
  • smarter_life
  • rico
  • map
  • gps
  • street
  • puerto
  • psoc
Related
Recommended

Smart Life Challenge: GeoCar quick update On the line (online!)

camuyano
camuyano
11 Dec 2013

A few posts ago I plotted a map with the coordinates from the PSoC manually by creating a Google Docs Fusion table. Last night I finished a small script that post the data and a page to display the data.

The web part has three major components:

1. The web app (using Django, python)

2. The Rest Api (using Django rest framework, python )

3. Plotting the map (using Leaflet, javascript - using open street map data)

 

Oh and since it is in python you may run it anywhere, on your pc or on you Raspberry pi.

 

All code is on github, I commit as I go so it is not close to be organized but is on the line (online!).

Reads from PSoC into a text file

https://github.com/soynerdito/psoctracker/blob/master/test/import_bluetooth.py

Reads text file and sends it to the database

https://github.com/soynerdito/psoctracker/blob/master/test/gps_post.py

 

Here is a picture of the data I posted. In this example there are plenty of dots but all are close together because they were taken while I was programming with the GPS out the window. But you get the idea. Also for who didn't knew where Puerto Rico is, now you know. Boom!, extra info right there.

 

image

 

Note:

On another note, last night while I was sticking my hand with a CO sensor in the exhaust of the car it rained on me. I really enjoyed going outside with a laptop and a few cables for data gathering. It counts as an outside activity!

  • Sign in to reply
  • camuyano
    camuyano over 12 years ago in reply to vsluiter

    A Rest API is like a new standard on how to access services on the web. For example Twitter has Rest API to provide others to use the service. It is like hitting a web URL with arguments. A rest service is more of a way of doing than a standard. For example if you use an ethernet network adapter on your microcontroller and receive data from a network client that can be called a rest API. Lets say your micocontroller is 192.168.1.2 and from a client you call http://192.168.1.2/L11 that can be called a rest service. On your microcontroller you may listen to the L11 string and do something, that can be like an instruction L > light 1 => light number 1 => ON. I don't know if it makes sense but that is the idea. Also a Rest API interface allow anything to connect to it. A simple micro controller can access the service not the case if I use something like a Web Service because that requires the messages to be pack into a binary package and that is restricted to smart clients like PCs.

    Django is a web framework that is coded in python. It is well because it is open source and well pack. Django and python allow me to put the app in a raspbery pi or a web hosting site. The PSoC by itself can collect data where a PC cannot go, but the data needs to be analized elsewhere and there is when I like others to join in. Right now, I use Django to create the database that holds the data collected from the PSoC.

    My project has a lot of ramifications because I see it as a solution not just a hardware solution. I like good DIY alternative for securing the vehicle. Since the PSoC is so small this will look pretty beautiful and small all packed in a small board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vsluiter
    vsluiter over 12 years ago

    Javier,

     

    Maybe a dumb question, but what is a 'Rest API'? I'm completely at a loss concerning Django, Rest API and leaflet. Although not really PSOC related it might be nice to show how you're using those frameworks / tools in your project. I've never done much in 'online' applications, so it would be interesting !!                  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 12 years ago

    Yeah,  but it doesn't count as exercise! image

     

    You might look at what Gelma did during the Energy Harvesting Contest for CO2 monitoring.

     

    DAB

    • 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 © 2026 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