7,275
edits
(8 intermediate revisions by the same user not shown) | |||
ソフトウェアの情報は LLC に合わせている。
Arduino Yun の面白さ(逆に難しさ)はマイコン屋の知識と、UNIX屋・ネットワーク屋の知識と、Web屋の知識がすべて必要なところ。それぞれの専門家からみたら他方はブラックボックスに見えて理解
= 導入 =
[http://xx-prime.hatenablog.com/entry/2015/04/26/224618 Arduino yunで放射線センサのデータをxivelyとM2Xにアップロードする - XX-Prime's blog]
[http://qiita.com/kassy_kz/items/ebeda9bcda444cf401a0 IFTTTを用いてArduinoからツイートする
[https://github.com/itman83/ArduinoYun https://github.com/itman83/ArduinoYun]
{
uint8_t sreg = SREG;
noInterrupts(); // Protect from a scheduler and prevent transactionBegin
if (!initialized) {
// Set SS to high so a connected chip will be "deselected" by default
uint8_t port = digitalPinToPort(SS);
uint8_t bit = digitalPinToBitMask(SS);
volatile uint8_t *reg = portModeRegister(port);
// if the SS pin is not already configured as an output
// then set it high (to enable the internal pull-up resistor)
if(!(*reg & bit)){
digitalWrite(SS, HIGH);
}
// When the SS pin is set as OUTPUT, it can be used as
// a general purpose output port (it doesn't influence
// SPI operations).
pinMode(SS, OUTPUT);
// Warning: if the SS pin ever becomes a LOW INPUT then SPI
// automatically switches to Slave, so the data direction of
// the SS pin MUST be kept as OUTPUT.
SPCR |= _BV(MSTR);
SPCR |= _BV(SPE);
= Arduino Yún LininoOS 差分 =
*
*
*
*
**こんなのあるんだ。これを拡張するのかな [https://www.kernel.org/doc/html/latest/driver-api/iio/index.html Industrial I/O (IIO)]
*
*
= link =
|