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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
IoT on Wheels Design Challenge
  • Challenges & Projects
  • Design Challenges
  • IoT on Wheels Design Challenge
  • More
  • Cancel
IoT on Wheels Design Challenge
Blog BLOG 6 : Want a Homemade Smart Cycle Computer ? [ PART 2 ]
  • 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: gsgill112
  • Date Created: 12 Nov 2017 1:08 PM Date Created
  • Views 588 views
  • Likes 1 like
  • Comments 1 comment
  • sbsr
  • iotonwheels
Related
Recommended

BLOG 6 : Want a Homemade Smart Cycle Computer ? [ PART 2 ]

gsgill112
gsgill112
12 Nov 2017

Hey Guys Welcome to yet another Very Short UPDATE Blog Post on Smart Bike Smart Rider Project for IoTonWheels Design Challenge. In this Blog Post I will Go through testing and setting up the Hall effect Sensor With the STM32 Board using mBed Toolchain.

 

So in the last post we had fabricated our sensor board Now lets interface it image

In this image Pin one on Top is the Vcc (+3.3V), Middle is GND and Bottom is Vo (i.e Signal pin)image

So the sensor by defaults Outputs a High i.e. Logic 1 when no external Magnetic element is found, and Outputs a Low, i.e. Logic 0 when South (SOUTH) pole of the magnet crosses close to the sensor.

 

In my first test I created a Stand Alone Application to test the above functionality using Interrupts as that is what I want image

 

<CODE>

#include "mbed.h"

 

DigitalOut myled(LED1);

 

InterruptIn hallSensor(PA_12);

// Hall Sensor Vout Connected to P8. and GND and VCC Connected to GND and +3.3v Respectively

 

// pb Interrupt routine - is interrupt activated by a falling edge of pb input

void hallSensor_ISR (void) {

    myled = !myled;

}

 

int main() {

    hallSensor.fall(&hallSensor_ISR);

    // Blink myled in main routine when the Int occurs

    // via interrupts that activate hallSensor_ISR routine

    while (1) {

    }

}

<CODE ENDS>

 

NOTE : I will do a blog on introduction and playing with mBed platform for now I wanted to keep this one very short and crisp image

 

To my surprise the code worked In first attempt and I had tears of Joy coming from my eyes. (No I am not a CryBaby This was the First time something Worked with ST and mBED !!)

 

Regards,

GS Gill

 

P.S. As usual, any comments of your's is a valuable Feedback image and a potential scope of improvement of content I publish.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 8 years ago +1
    Nice update. Yes, having a plan actually work on the first try is indeed an emotional event. It signifies a grasp of the problem and a good implementation of your solution. There was a time when I could…
  • DAB
    DAB over 8 years ago

    Nice update.

     

    Yes, having a plan actually work on the first try is indeed an emotional event.  It signifies a grasp of the problem and a good implementation of your solution.

     

    There was a time when I could do this type of software update first time every time, but that has been a number of decades ago.

     

    DAB

    • Cancel
    • Vote Up +1 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