Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
blocks:app-note:arduino [2023-08-01 11:35]
melvin created
blocks:app-note:arduino [2023-08-16 17:30]
mattias [Connecting an Arduino microcontroller to Blocks]
Line 1: Line 1:
-====== Connecting an Arduino microcontroller to Blocks ====== +====== Connecting an Arduino microcontroller with encoder to Blocks ======
- +
-This application note provides an example of how an [[https://en.wikipedia.org/wiki/Rotary_encoder|encoder]] connected to an [[https://www.arduino.cc/|Arduino]] microcontroller can be used to interact with Blocks. It is assumed that the reader is familiar with Arduino concepts, the Arduino IDE and microcontrollers in general.+
  
 +This application note provides an example of how an [[https://en.wikipedia.org/wiki/Rotary_encoder|encoder]] connected to an [[https://www.arduino.cc/|Arduino]] microcontroller can be used to interact with Blocks. It is assumed that the reader is familiar with Arduino concepts, the Arduino IDE and microcontrollers in general. The application note is provided for inspiration please direct Arduino questions towards the Arduino community forums. Pixilab may be able to qoute custom solutions as per request. 
 ===== Installation ===== ===== Installation =====
  
Line 11: Line 10:
   - Open the downloaded Arduino sketch in the Arduino IDE. The Arduino sketch depends on the [[https://github.com/PaulStoffregen/Encoder|Encoder library]], which can be downloaded through the Library Manager in the Arduino IDE.   - Open the downloaded Arduino sketch in the Arduino IDE. The Arduino sketch depends on the [[https://github.com/PaulStoffregen/Encoder|Encoder library]], which can be downloaded through the Library Manager in the Arduino IDE.
   - Upload the sketch to the Arduino.   - Upload the sketch to the Arduino.
-  - Connect the encoder to digital pins 2 and 3 on the Arduino.+  - Connect the encoder data wires to digital pins 2 and 3 on the Arduino (interrupt pins), power and ground. Find out the wire colors from the encoder whitepapers.
   - Connect the Arduino to a computer running PIXILAB Player.   - Connect the Arduino to a computer running PIXILAB Player.
   - Start Blocks.   - Start Blocks.