MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeMegaPi.h
Go to the documentation of this file.
1
36#ifndef MeMegaPi_H
37#define MeMegaPi_H
38
39#include <Arduino.h>
40#include "MeConfig.h"
41
42// Supported Modules drive needs to be added here
43#include "Me7SegmentDisplay.h"
44#include "MeUltrasonicSensor.h"
45#include "MeDCMotor.h"
46#include "MeRGBLed.h"
47#include "Me4Button.h"
48#include "MePotentiometer.h"
49#include "MeJoystick.h"
50#include "MePIRMotionSensor.h"
51#include "MeShutter.h"
52#include "MeLineFollower.h"
53#include "MeSoundSensor.h"
54#include "MeLimitSwitch.h"
55#include "MeLightSensor.h"
56#include "MeSerial.h"
57#include "MeBluetooth.h"
58#include "MeWifi.h"
59#include "MeTemperature.h"
60#include "MeGyro.h"
61#include "MeInfraredReceiver.h"
62#include "MeCompass.h"
63#include "MeUSBHost.h"
64#include "MeTouchSensor.h"
65#include "MeStepper.h"
66#include "MeStepperOnBoard.h"
67#include "MeEncoderMotor.h"
68#include "MeEncoderNew.h"
69#include "MeBuzzer.h"
70#include "MeLEDMatrix.h"
71#include "MeHumitureSensor.h"
72#include "MeFlameSensor.h"
73#include "MeGasSensor.h"
74#include "MeEncoderOnBoard.h"
75#include "MeMegaPiDCMotor.h"
76#include "MePressureSensor.h"
77#include "MePS2.h"
78#include "MeColorSensor.h"
79/********************* MegaPi Board GPIO Map *********************************/
80// struct defined in MeMegaPi.h
81#define PORT1A PORT_1
82#define PORT1B PORT_9
83#define PORT2A PORT_2
84#define PORT2B PORT_10
85#define PORT3A PORT_3
86#define PORT3B PORT_11
87#define PORT4A PORT_4
88#define PORT4B PORT_12
89
90 MePort_Sig mePort[17] =
91 {
92 { NC, NC }, { NC, NC }, { NC, NC }, { NC, NC }, { NC, NC },
93 { 16, 17 }, { A8, A9 }, { A10, A11 }, { A13, A12 }, { NC, NC },
94 { NC, NC }, { NC, NC }, { NC, NC }, { NC, NC }, { NC, NC },
95 { NC, NC },{ NC, NC },
96 };
97
98 Encoder_port_type encoder_Port[6] =
99{
100 { NC, NC, NC, NC, NC},
101 //NET2 NET1 PWM DIR1 DIR2
102 { 18, 31, 12, 34, 35},
103 //ENB A ENB B PWMB DIR B1 DIR B2
104 { 19, 38, 8, 37, 36},
105 { 3, 49, 9, 43, 42},
106 { 2, A1, 5, A4, A5},
107 { NC, NC, NC, NC, NC},
108};
109
110 megapi_dc_type megapi_dc_Port[14] =
111{
112 {NC,NC,NC}, {33,32,11}, {40,41, 7}, {47,48, 6}, {A3,A2, 4},
113 {NC,NC,NC}, {NC,NC,NC}, {NC,NC,NC}, {NC,NC,NC}, {35,34,12},
114 {36,37, 8}, {42,43, 9}, {A5,A4, 5},
115};
116
117 megaPi_slot_type megaPi_slots[4] =
118{
119 {35, 34, 33, 32, 31, 18, 12, 11},
120 {36, 37, 40, 41, 38, 19, 8, 7},
121 {42, 43, 47, 48, 49, 3, 9, 6},
122 {A5, A4, A3, A2, A1, 2, 5, 4}, // for megapi
123};
124//for step motor on board
125#endif // MeMegaPi_H
Me4Button.h
Header for Me4Button.cpp module.
Me7SegmentDisplay.h
Header file for Me7SegmentDisplay.cpp.
MeBluetooth.h
Header for MeBluetooth.cpp module.
MeBuzzer.h
Header for MeBuzzer.cpp module.
MeColorSensor.h
Header for MeColorSensor.cpp module.
MeCompass.h
Header for MeCompass.cpp module.
MeConfig.h
Configuration file of library.
MeDCMotor.h
Header for MeDCMotor.cpp module.
MeEncoderMotor.h
Header for MeEncoderMotor.cpp module.
MeEncoderNew.h
Header for MeEncoderNew.cpp module.
MeEncoderOnBoard.h
Header for MeEncoderOnBoard.cpp module.
MeFlameSensor.h
Header for MeFlameSensor.cpp module.
MeGasSensor.h
Header for MeGasSensor.cpp module.
MeGyro.h
Header for MeGyro.cpp module.
MeHumitureSensor.h
Header for for MeHumitureSensor.cpp module.
MeInfraredReceiver.h
Header for for MeInfraredReceiver.cpp module.
MeJoystick.h
Header for MeJoystick.cpp module.
MeLEDMatrix.h
Header for MeLEDMatrix.cpp module.
MeLightSensor.h
Header file for Me-Light Sensor.cpp.
MeLimitSwitch.h
Header for MeLimitSwitch.cpp.
MeLineFollower.h
Header for for MeLineFollower.cpp module.
MeMegaPiDCMotor.h
Header for MeMegaPiDCMotor.cpp module.
MePIRMotionSensor.h
Header for MePIRMotionSensor.cpp.
MePS2.h
Header for MePS2.cpp module.
MePotentiometer.h
Header for MePotentiometer.cpp.
MeRGBLed.h
Header for MeRGBLed.cpp module.
MeSerial.h
Header for for MeSerial.cpp module.
MeShutter.h
Header for MeShutter.cpp module.
MeStepper.h
Header for MeStepper.cpp module.
MeStepperOnBoard.h
Header for MeStepperOnBoard.cpp module.
MeTemperature.h
Header for MeTemperature.cpp module.
MeTouchSensor.h
Header for for MeTouchSensor.cpp module.
MeUSBHost.h
Header for MeUSBHost.cpp module.
MeUltrasonicSensor.h
Header for for MeUltrasonicSensor.cpp module.
MeWifi.h
Header for for MeWifi.cpp module.
Encoder_port_type
Definition MeEncoderOnBoard.h:122
MePort_Sig
Definition MePort.h:71
megaPi_slot
Definition MeStepperOnBoard.h:77
megapi_dc_type
Definition MeMegaPiDCMotor.h:50