Sharing enums between C++ and C#

In your C# project  properties on the Build tab, add a conditional compilation symbol called C_SHARP Then create a new file in the C# project to hold the Enums. Here I’ve created an enum called AlarmEnum in the namespace Models in a file called commonAlarms.cs   #if C_SHARP using System; namespace Models { public #endif enum AlarmEnum { //Common AL_NONE = 0, AL_PROCESS_ABORT =1, AL_VACUUM_TRIP = 2, AL_DOOR_OPEN = 3, AL_AIR_FAIL…

Arduino robot

Little two wheel drive robot. The ultrasonic sensor is mounted on a servo so it can look around. The solar battery charger has two outputs, one powers the motors and the other powers the Arduino. Needs some bump sensors at the front to detect low obstacles. The code includes some Bluetooth telemetry data but that’s not been tested yet. //Motors #include <stdio.h> #include <AFMotor.h> #include <Servo.h> AF_DCMotor leftWheel(1); AF_DCMotor rightWheel(2);…

Arduino Weather Station

An Arduino with a DHT22 Temperature/Humidity sensor and a BMP180 pressure sensor. Fairly basic code, just scrolls through 3 screens showing temperature, humidity and pressure. The min/max is also displayed. // include the library code: #include <LiquidCrystal.h> #include <stdio.h> #include “DHT.h” #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BMP085_U.h> //—-DHT setup #define DHTTYPE DHT22   // DHT 22  (AM2302) #define DHTPIN 2 //Temp humidity sensor DHT dht(DHTPIN, DHTTYPE); //—-BMP180 setup //Connect SCL to…