Arduino Duemilanove

From Ethersex_Wiki
Revision as of 13:25, 12 August 2014 by Coffee (talk | contribs) (correct previous edit)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Support for Arduino Duemilanove is still experimental!


Named Pin Configuration

Here the appropriate core/portio/config for Named_PIN

  • Named Pin must be enabled!
#
#   Named Pin Configuration File
#
# You can assign names to your microcontroller's pins here.
# Keep in mind that this names must consist of alphanumeric 
# characters only!
#
# Every line starting with a hash sign (#) is a comment.
#
#
# PIN | IN/OUT | When active? | Name
#-----+--------+--------------+----------------
PD0     OUTPUT   HIGH           p0
PD1     OUTPUT   HIGH           p1
PD2     OUTPUT   HIGH           p2
PD3     OUTPUT   HIGH           p3
PD4     OUTPUT   HIGH           p4
PD5     OUTPUT   HIGH           p5
PD6     OUTPUT   HIGH           p6
PD7     OUTPUT   HIGH           p7
PB0     OUTPUT   HIGH           p8
PB1     OUTPUT   HIGH           p9
PB2     OUTPUT   HIGH           p10
PB3     OUTPUT   HIGH           p11
PB4     OUTPUT   HIGH           p12
PB5     OUTPUT   HIGH           p13
PC0     INPUT    HIGH           a1
PC1     INPUT    HIGH           a2
PC2     INPUT    HIGH           a3
PC3     INPUT    HIGH           a4
PC4     INPUT    HIGH           a5
PC5     INPUT    HIGH           a6

Control6 Scripts

An Introduction into Control6 is also available on the page for PIN_Commands

Example for a Control6 with Named Pin

  • Script at control6/control6.src
  • control6 must be enabled!
  • Named_Pin must be enabled!
THREAD(arduino_blink)
 PIN_CLEAR(p13);
 WAIT(1);
 PIN_SET(p13);
 WAIT(1);
THREAD_END(arduino_blink)
THREAD_START(arduino_blink)

Example with Named Pin

  • Script at control6/control6.src
THREAD(arduino_blink)
 PORTB &= ~_BV(PB5);
 WAIT(1);
 PORTB |= _BV(PB5);
 WAIT(1);
THREAD_END(arduino_blink)
THREAD_START(arduino_blink)