MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeMegaPiPro.h
Go to the documentation of this file.
1
35#ifndef MeMegaPiPro_H
36#define MeMegaPiPro_H
37
38#include <Arduino.h>
39#include "MeConfig.h"
40
41// Supported Modules drive needs to be added here
42#include "Me7SegmentDisplay.h"
43#include "MeUltrasonicSensor.h"
44#include "MeDCMotor.h"
45#include "MeRGBLed.h"
46#include "Me4Button.h"
47#include "MePotentiometer.h"
48#include "MeJoystick.h"
49#include "MePIRMotionSensor.h"
50#include "MeShutter.h"
51#include "MeLineFollower.h"
52#include "MeSoundSensor.h"
53#include "MeLimitSwitch.h"
54#include "MeLightSensor.h"
55#include "MeSerial.h"
56#include "MeBluetooth.h"
57#include "MeWifi.h"
58#include "MeTemperature.h"
59#include "MeGyro.h"
60#include "MeInfraredReceiver.h"
61#include "MeCompass.h"
62#include "MeUSBHost.h"
63#include "MeTouchSensor.h"
64#include "MeStepper.h"
65#include "MeStepperOnBoard.h"
66#include "MeEncoderMotor.h"
67#include "MeEncoderNew.h"
68#include "MeBuzzer.h"
69#include "MeLEDMatrix.h"
70#include "MeHumitureSensor.h"
71#include "MeFlameSensor.h"
72#include "MeGasSensor.h"
73#include "MeEncoderOnBoard.h"
74#include "MeMegaPiDCMotor.h"
75#include "MePressureSensor.h"
76#include "MePS2.h"
77#include "MeSmartServo.h"
78#include "MeDCMotor.h"
79#include "MeMegaPiProESCMotor.h"
80#include "MeColorSensor.h"
81
82/********************* MegaPiPro Board GPIO Map *********************************/
83// struct defined in MegaPiPro.h
84#define PORT1A PORT_1
85#define PORT1B PORT_9
86#define PORT2A PORT_2
87#define PORT2B PORT_10
88#define PORT3A PORT_3
89#define PORT3B PORT_11
90#define PORT4A PORT_4
91#define PORT4B PORT_12
92/*4 Dc Motor gpio Map*/
93#define M9 (0X01)
94#define M10 (0X02)
95#define M11 (0X03)
96#define M12 (0X04)
97
98 MePort_Sig mePort[17] =
99 {
100 { NC, NC },{ 46, 23 }, { 45, 22 }, { 44, 25 }, { 10, 24 },
101 { 16, 17 },{ A9, A4 }, { A10, A11}, { A15, A14}, { A13, A12 },
102 { A7, A8 },{ A6, A5 }, { A1, A2 }, { NC, NC }, { NC, NC },
103 { NC, NC }, { NC, NC },
104 };//PORT 5~ PORT 12 is for the RJ25 Shield
105 //PORT1~PORT4 is for the 4dcmotor shield
106
107 megapi_dc_type megapi_dc_Port[14] =
108{
109 { NC, NC }, {33,32,11}, {40,41, 7}, {47,48, 6}, {28,27, 4},
110 { NC, NC }, { NC, NC }, { NC, NC }, { NC, NC }, {35,34,12},
111 {36,37, 8}, {42,43, 9}, {39,29, 5},
112};
113
114 Encoder_port_type encoder_Port[6] =
115{
116 { NC, NC, NC, NC, NC},
117 //NET1 NET2 PWM DIR1 DIR2
118 { 18, 31, 12, 34, 35},
119 //ENB A ENB B PWMB DIR B1 DIR B2
120 { 19, 38, 8, 37, 36},
121
122 { 3, 49, 9, 43, 42},
123
124 { 2, 26, 5, 29, 39},// for MegaPi Pro
125 { NC, NC, NC, NC, NC},
126};
127
128 megaPi_slot_type megaPi_slots[4] =
129{
130 {35, 34, 33, 32, 31, 18, 12, 11},
131 {36, 37, 40, 41, 38, 19, 8, 7},
132 {42, 43, 47, 48, 49, 3, 9, 6},
133 /* {A5, A4, A3, A2, A1, 2, 5, 4}*/// for megapi
134 {39, 29, 28, 27, 26, 2, 5, 4}// for megapipro
135};
136
137 megapipro_esc_type megapi_esc_Port[5] =
138{
139 { NC}, {12}, {8}, {9}, {5},
140};
141//for step motor on board
142#endif // MeMegaPiPro_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.
MeMegaPiProESCMotor.h
Header for MeMegaPiProESCMotor.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.
MeSmartServo.h
Header for for MeSmartServo.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
megapipro_esc_type
Definition MeMegaPiProESCMotor.h:53