LoginSignup
0
0

More than 5 years have passed since last update.

スロットル バイ ワイヤー その2

Last updated at Posted at 2016-01-14

概要

arduino megaでappセンサーを読んで、電子スロットルモジュールを動かした。
アクセルもスロットルもホンダ フィットです。

動画

写真

MVC-009S.JPG

回路図

app.JPG

サンプルコード


int a0;
int a1;
void setup()
{
    pinMode(3, OUTPUT);
    digitalWrite(3, HIGH);
}
void loop()
{
    a0 = analogRead(0);
    a1 = analogRead(1);
    a0 = map(a0, 348, 860, 0, 1023);
    a1 = map(a1, 93, 481, 0, 1023);
    if (a0 > a1)
    {
        digitalWrite(3, HIGH);
    }
    else
    {
        digitalWrite(3, LOW);
    }
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0