Skip to content

nekromant/blackboard-STC15

 
 

Repository files navigation

blackboard-STC15

A firmware for STC15L2K32S microcontroller on Black Board T5 ESP-13

Use SDCC to compile

Use STC MCU ISP flash tool to programm

Install both sdcc and stcgal per instructions (or use distribution packages for sdcc)

make make install # will download to the MCU

What it supports for now:

  • STC15 UART (baudrate: 115200)
  • Reading on-board DHT11 values
  • One-wire communications (DS18B20 temp sensor) via P1.5 (pin 4 of 5-pin header)
  • I2C communications via pins 2 and 3 (SDA/SCL) of 5-pin header (tested with BH1750 light sensor)
  • Using PWM to flash on-board RGB LEDs
  • On-board beeper
  • On-board relay
  • Interaction with frankenstein's nextcloud sensorlogger.

Nextcloud sensorlogger HOWTO

This firmware allows you to post data to your nextcloud sensorlogger

To use nextcloud sensorlogger firmware, you have to:

  • Flash your esp8266 with recent frankenstein firware that supports new 'senslog' commands.
  • Flash the STC MCU with nextcloud-sensor-logger.ihx
  • Before connecting STC & ESP8266 via jumpers, connect uart to esp8266 and configure the relevant environment variables. This can be done by running the following commands in the frankentein commandline:
    setenv slog-deviceId YourDeviceId
    setenv slog-deviceName 'BlackBoard T5'
    setenv slog-deviceGroup 'sensors'
    setenv slog-deviceParentGroup 'home'
    setenv slog-nextCloudUrl 'https://cloud.example.com'
    setenv slog-userName 'Mr. Bean'
    setenv slog-password 'aintgonnatell'
    saveenv
  • Connect the jumpers, and put your board somewhere ;)

STC will power esp8266 on every 15 minutes by default, post the data and turn it off to minimize power consumption. You may want to adjust the timeout in nextcloud-sensor-logger.c.

TODO

  • 2nd UART to interface ESP chip

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 55.7%
  • C 43.7%
  • Makefile 0.6%