標題: [操作疑難] ATTiny461 改用 Arduino Pro Mini 得唔得 [打印本頁]
作者: dtom 時間: 2014-5-5 14:34 標題: ATTiny461 改用 Arduino Pro Mini 得唔得
搵到有人分享電路,
佢係用 ATTiny461 microcontroller,
我想改用 Arduino Pro Mini 係咪都得呢?
EAGLE files: pcb
Source (FSR_Detector.ino) 節錄:
// Define the pins that have LEDs on them. We have one LED for each of the three FSRs to indicate
// when each FSR is triggered. And one power/end stop LED that is on until any of the FSRs are
// triggered.
#define LED1 13
#define LED2 12
#define LED3 11
#define LEDTRIGGER 10
#define ENDSTOP 03
// Define the pins used for the analog inputs that have the FSRs attached. These have external
// 10K pull-up resistors.
#define FSR1 A0
#define FSR2 A1
#define FSR3 A2
// The end stop output
#define TRIGGER 03
佢既 SIG 係咪即係 Pro Mini 既 03 腳呢? 定係要再改下先用到呢...
作者: Charcoal99 時間: 2014-5-5 18:53
這個ino檔是跨device的,無需修改,用Pro Mini 的 3 號腳即可。
3 號腳(每一隻腳)的具體定義是在 arduino variants 目錄中的 pins_arduino.h 中定義的, 按不同的device映射到不同的 I/O 口。
內文中提到的 ATTinyCore 已經定按 Arduino 的定義修改了ATTINY 的 pins_arduino.h, ino 跟標準的 arduinio 相容, 只是 ATTINY 僅有 ATMEGA 部份的功能而已。
