(Created page with "Category:Explore M3 Bare Metal In this tutorial we will see how to blink the LED using the explore Embedded bare metal libraries.<br> The libraries can be used on differen...")
 
Line 1: Line 1:
 
[[Category:Explore M3 Bare Metal]]
 
[[Category:Explore M3 Bare Metal]]
In this tutorial we will see how to blink the LED using the explore Embedded bare metal libraries.<br>
+
In this tutorial we will see how read a switch and trun ON/OFF the LED/Buzzer/Relay using the explore Embedded bare metal libraries.<br>
 
The libraries can be used on different platforms like Keil, ARM GCC, GCC And Eclipse etc.<br><br>
 
The libraries can be used on different platforms like Keil, ARM GCC, GCC And Eclipse etc.<br><br>
  
Line 14: Line 14:
  
 
=Hardware Connection=
 
=Hardware Connection=
ExploreM3 comes with on board led connected to pin 13.
+
ExploreM3 comes with on board led connected to pin 13 and a USB_BOOT switch .
 
<br><br><br>
 
<br><br><br>
  
 
=Code=
 
=Code=
Below is the sample code the blink the LED connected to pin 13.
+
Below is the sample code to read the switch status and turn ON/OFF the LED.
 
<html>
 
<html>
 
<script src="https://gist.github.com/SaheblalBagwan/22b56f0eb7a4ccad41411b8fad0ad435.js"></script>
 
<script src="https://gist.github.com/SaheblalBagwan/22b56f0eb7a4ccad41411b8fad0ad435.js"></script>

Revision as of 14:43, 28 April 2016

In this tutorial we will see how read a switch and trun ON/OFF the LED/Buzzer/Relay using the explore Embedded bare metal libraries.
The libraries can be used on different platforms like Keil, ARM GCC, GCC And Eclipse etc.


Prerequisites

Please check this tutorial for detailed explanation on lpc1768 Gpio configuration.
If you are doing it for the first time, then check the below links to setup the project for generating the .bin file.

  1. Keil4 Setup
  2. Keil5 Setup
  3. ARM GCC Setup
  4. Eclipse & ARM GCC Setup



Hardware Connection

ExploreM3 comes with on board led connected to pin 13 and a USB_BOOT switch .


Code

Below is the sample code to read the switch status and turn ON/OFF the LED.

Demo