Skip to content

Instantly share code, notes, and snippets.

@thinkchip
thinkchip / example_arduino_mdb_coin_changer
Created January 14, 2017 01:58
Example Arduino MDB Coin changer communication Lite
/*
*/
#include <SoftwareSerial.h>
#define TERM_COIN 0x02
#define TERM_COIN_INIT 0x01
#define TERM_COIN_STOP 0x02
#define TERM_COIN_POLL 0x03
#define TERM_COIN_TUBE 0x05
#define TERM_COIN_PAYOUT 0x07
@thinkchip
thinkchip / script_easymdbrs232_terminal
Created January 2, 2015 13:20
script terminal easymdb rs232
//******************************
// Terminal Script//
//******************************
program test;
const StringSendID = 'Sending ID command';
const StringSendCoinInit = 'Sending Initialization Coin Changer';
var Inbuffer:String;
var receivedchar:byte;
var pointerbuffer:byte;
var stop:boolean;
@thinkchip
thinkchip / script_terminal
Created December 27, 2014 05:56
script_terminal
//******************************
// Terminal Script//
//******************************
program test;
const StringSendID = 'Sending ID command';
const StringSendCoinInit = 'Sending Initialization Coin Changer';
var Inbuffer:String;
var receivedchar:byte;
var pointerbuffer:byte;
var stop:boolean;
@thinkchip
thinkchip / wirelesssensornode
Created October 5, 2014 16:35
Wireless sensor node
/**
* ----------------------------------------------------------------------------
* WirelessMonitorSensor.ino - wireless monitor sensor sketch using AIR430Boost ETSI driver.
* Copyright (C) 2012-2013 Anaren Microwave, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@thinkchip
thinkchip / wirelessmonitorhub
Created October 5, 2014 16:32
Wireless monitor hub
/**
* ----------------------------------------------------------------------------
* WirelessMonitorHub.ino - wireless monitor hub sketch using AIR430Boost FCC driver.
* Copyright (C) 2012-2013 Anaren Microwave, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
@thinkchip
thinkchip / ledrgb1
Created September 16, 2014 02:09
Led rgb Launchpad
#define REDPIN 15
#define GREENPIN 14
#define BLUEPIN 13
#define FADESPEED 5 // make this higher to slow down
void setup() {
pinMode(REDPIN, OUTPUT);
pinMode(GREENPIN, OUTPUT);
pinMode(BLUEPIN, OUTPUT);
@thinkchip
thinkchip / gist:114f6e8d904ead2bd086
Created August 7, 2014 12:12
EasyMDB RS232 V1.0.2
#
#Example of how to use EasyMDB RS232
#Date June/2014
#Version 1.0.2
#Not warranty, for educational purposes
#Thinkchip
#V1.0.1
#dispense coin function
#Level coin changer added
@thinkchip
thinkchip / mbed.c
Created July 2, 2014 17:53
mbed practica 1
#include "mbed.h"
int main() {
DigitalOut led(LED_RED);
while (true) {
led = 1; // off
@thinkchip
thinkchip / mbed.c
Created July 2, 2014 17:47
mbed practica 1
#include "mbed.h"
int main() {
DigitalOut led(LED_RED);
while (true) {
gpo = 1;
led = 1; // off
@thinkchip
thinkchip / ArduinoMDB.ino
Created July 1, 2014 23:40
Arduino comunicacion EasyMDB RS232
// Comunicacion serial con dispositivo MDB
//THINKCHIP
#include <LiquidCrystal.h>
LiquidCrystal lcd(43, 39, 29, 27, 25, 23);
String inputString = ""; //Arreglo recibido
boolean stringComplete=false; //Bandera del arreglo recibido
boolean comienza=true; //Bandera de inicio de comunicación