Mini Battery Display - Inline C
Here is a quick example of inline C being used to power a mini battery display. As there''s no library for this display on the forum, I used inline C with the original Arduino IDE source code. I''ve slimmed down the inline C code to make it easier to read. You can find the original library and source code on Github, just copy the 2 library files into your Arduino IDE library folder.
@Peter Simpson · 2017-05-11
Set servo angle via potentiometer and show on display
SubName: Set a servo angle and show the angle reading on a OLED display Description: Their are already a few servo examples on this forum, but here is my take on it. I''m using a quality TURNIGY servo and a standard cheap 10kΩ potentiometer. As you turn the potentiometer the display changes to shows you the angle that the servo is set to, reading ranges from 0° to 179°.
@Peter Simpson · 2017-04-19
Reading and display voltage and current made easy
SubName: Reading voltage and current and display the results onto an OLED display. Description: Use the code below to display the voltage and current from load connected to a MAX471 module. The Max471 is a low cost precision high side current sense amplifiers with a maximum supply voltage of 36V. I personally would not push it that high, but putting 25V through it for a 5V Arduino or compatible device is more than adequate.
@Peter Simpson · 2017-04-16
Reading temperature sensor DS18B20 via inline C/C++, again
You can use this basic code to read the temperature readings from a DS18B20 temperature module, this can easily be done using inline C/C++. I''m reading °C but you can easily change it to °C by replacing ''sensors.getTempCByIndex(0)'' with ''sensors.getTempFByIndex(0)''.
@Peter Simpson · 2017-04-01
Temperature sensors comparison - DS18B20 vs DHT11
Comparing the DS18B20 and the DHT11 temperature sensors at the exact same time This is just a quick comparison between the two above named temperature sensors, nothing special really. I was looking through my Arduino parts toolbox when I suddenly realised that I had two types of temperature sensors, I had not even opened the anti-static bag with the DHT11 inside it, so I decided to place them both on a mini breadboard with a 4 pin OLED display to compare and display their temperature readings.
@Peter Simpson · 2017-04-01
Long press short press one button
This is just one solution on how to tell if a button is being long pressed or short pressed. There are plenty of other solution to do this, this is my take on it, it''s simple but effective.
@Peter Simpson · 2017-03-30
Example of GFX.drawLine (Adafruit GFX library)
Use this code to draw and rotate lines onto an OLED display. You will need the rAdafruitSSD1306 and rAdafruitGFX libraries loaded into your libraries tab. The code is simple enough to follow once you get your head around it, this is good for learning GFX.drawLine.
@Peter Simpson · 2017-03-10
HMC5883L interfacing with Wemos...
Interface HMC5883L (Triple-axis Magnetometer (Compass)) with Wemos (ESP8266) with inline C
@rbghongade · 2017-03-07
Modulo Operator (Inline C)
Modulo Operator (Inline C)
@inakigarm · 2017-03-06
Set IP address static/fixed for ESP8266
Set IP address static/fixed for ESP8266
@ilpesce · 2017-03-06
measuring low frequenzy with ADXL335
measuring low frequenzy with ADXL335
@Hans- Joachim Krahe · 2017-03-04
Display the current time via DS1302 RTC
Displaying the current time on a 4 Bit 7 segment display from a battery backed up DS1302 RTC (Real Time Clock).
@Peter Simpson · 2017-03-03
EEPROM Clear
This example illustrates how to set of all of the bytes to zero (0), initialising them to hold new information, using the EEPROM.WriteBytes function.
@Peter Simpson · 2017-03-01
Arduino Serial Command Framework
This framework simplifies serial interfacing via a command / response infrastructure. My Arduino projects are usually purely gadget interfaces linked to a higher functioning PC/ORDROID/Android device to actually do the orchestration. There is a built in method to identify the board via an ID and physically by blinking an on board led (pin 13).
@mrred128 · 2017-02-25
Switch a relay (to On) when it gets dark via an LDR and PIR
Switch a relay (to On) when it gets dark via an LDR and PIR
@Peter Simpson · 2017-02-23
Reading two sensors by A0 pin
Reading two sensors by A0 pin
@derez · 2017-02-20
Control LED brightness via 1838 IR receiver
You can use this basic code to control an LED (or anything else for that matter) that you want with a standard IR receiver. I was using a single off board VS1838B/TL1838 38KHz IR receiver with a Samsung TV remote control. Using the PWM (Pulse Width Modulation) pins is essential for controlling the brightness.
@Peter Simpson · 2017-02-18
Data JSON Format to Node-RED
For sending data from Arduino/ESP to Node-RED (running on a Raspberry Pi), JSON format is an option as Node-RED provides simple methods for parsing JSON. The example sub writes via asyncstream a Key:Value Pair Array as a JSON string.
@rwblinn · 2017-02-14
TCS34725 RGB Sensor interface with Wemos mini...
TCS34725 RGB Sensor interface with Wemos mini...
@rbghongade · 2017-02-13
BME280 with ESP8266 (Wemos mini)...
Interface the Bosch BME 280 sensor with ESP8266 via inline C code and the Arduino library
@rbghongade · 2017-01-30
driving xy stepmotors by single byte
driving two motors (x,y) with 16 steps can be realized by one byte orders (16 stepmodes in upper 4 bit, 16 in lower 4 bit)
@Hans- Joachim Krahe · 2017-01-08
driving xy stepmotors by single byte within redundance
driving xy stepmotors by single byte within redundance
@Hans- Joachim Krahe · 2017-01-05
hex to int
hex to int
@Hans- Joachim Krahe · 2017-01-03
HB100 RF sensor
This is a Doppler RF transmitter and receiver which can be used as a movement alert.
@derez · 2016-12-05
SN74HC165 Shift Register for multi input
The SN74HC165 Shift Register enables connecting many buttons to the Arduino/ESP8266 using only 4 pins.
@derez · 2016-11-20
DATE to Uint - Unit to Date Converter
I using this code, Because Board has a problem for records size capacity of epprom.
@Tayfur · 2016-10-08
TIME to Uint - Unit to TIME Converter
I using this code, Because Board has a problem for records size capacity of epprom.
@Tayfur · 2016-10-07
74HC595 Shift Register for multiple output
The attached implements a code module for use of a shift register for getting multiple outputs while using only 3 pins of the arduino/esp.
@derez · 2016-09-30
sub for Date Time adding
Date/time functions
@Tayfur · 2016-09-05
Get Board Mac Address [ESP8266]
Get Board Mac Address [ESP8266]
@Cableguy · 2016-07-10