Skip to content

Instantly share code, notes, and snippets.

View IdrisCytron's full-sized avatar

Idris Zainal Abidin IdrisCytron

View GitHub Profile
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
/*
* This example shows how to control MDDS60 in PWM mode with Arduino.
* Set MDDS60 input mode to 0b10110100
*
* Reference Tutorial:
* - Let's Arduino Controlling Your SmartDriveDuo-60
*
* Related Products:
* - SmartDriveDuo-60: http://www.cytron.com.my/P-MDDS60
* - CT UNO: http://www.cytron.com.my/p-ct-uno
/*
* This example shows how to control MDDS60 in Serial Simplified with Arduino.
* Set MDDS60 input mode to 0b11001100
*
* Serial data (8-bits): 0bMDSSSSSS
* M: Select motor, 0 for left, 1 for right.
* D: Direction, 0 for CW, 1 for CCW.
* SSSSSS: Motor speed.
*
* Example: Value in Decimal
/*
* This example shows how to control MDDS60 in Serial Packetized with Arduino.
* Set MDDS60 input mode to 0b11100000
*
* Serial Packet:
* 1st byte: Header.
* 2nd byte: Channel & Address.
* 3rd byte: Speed & Direction.
* 4th byte: Checksum = 1st byte + 2nd byte + 3rd byte.
*
@IdrisCytron
IdrisCytron / HomeSecuritySystem.ino
Created June 14, 2017 03:18
This code is written by Gayathri Gunasekaran from #mydigitalmaker Holiday Programme 2017
#include <ESPert.h>
ESPert espert;
const char *host = "www.espert.io";
String smartphone_key = "YourPhoneKey";
const char *ssid = "YourWiFiSSID";
const char *password = "YourWiFiPassword";
const int led1 = 2;
const int ir = 14;
@IdrisCytron
IdrisCytron / SignedMagnitude.ino
Last active June 14, 2017 15:03
Cytron_Shield3AMotor examples
/*
This example shows how to move G15 knob to certain angle with different speed.
Function:
control(motor1Speed, motor2Speed); // Value for motor1Speed and motor2Speed range
// is from -100 (max CCW) to 100 (max CW)
Product page:
3A Motor Driver Shield: https://www.cytron.com.my/p-shield-3amotor
CT-UNO: http://www.cytron.com.my/p-ct-uno
@IdrisCytron
IdrisCytron / IRDistanceClick.ino
Created July 25, 2017 03:44
IR Distance Click Arduino examples code
void setup()
{
// IR Distance Click OUT pin is connected to pin A0
// Set A0 as input
pinMode(A0, INPUT);
// Initialize Serial for debug purpose
Serial.begin(9600);
delay(1000); // Put some delay
}
@IdrisCytron
IdrisCytron / MakerUnoBTMobileRobot.ino
Last active March 21, 2018 03:43
Maker Uno - Build Your Own Mobile Robot and Control
/*
This example shows how to control Maker Uno mobile robot using BT remote app.
Tutorial page:
http://makeruno.com.my/build-your-own-mobile-robot-and-control/
Original written by:
07/02/18 Asyraf (Intern), Cytron Technologies
Modified by:
#include <LiquidCrystal.h>
const int rs = 13, en = 12, d4 = 8, d5 = 9, d6 = 10, d7 =11;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
#include <Servo.h>
Servo myservo;
int button1 = 2;
int button2 = 3;
/* Created by BrothEr yUnN
* Combination MakerUNO & LSS05 & Motor & Colour Sensor
* 7/3/2018 setup for Line Following Robot with Melody
*
* Connection wire motor to Motor Driver
* A = Black wire
* B = White wire
*
* Connection wire Colour Sensor to Arduino
* VCC = 5V