https://youtu.be/dGHoElzJrGg Name of the project l152_slotted_nb_delays Description Application will simultaneously blink 4 LEDs at 4 different speeds. This is a demonstration for the library presented in the previous article. It is a simple app, but more complex ones can be written like simultaneously scrolling a text on 4 (or more) 7seg LED displays. reading temperature … Continue reading Slotted non-blocking delays example (L152)
Month: July 2019
TIM6 and TIM7 slotted non-blocking delays
An array that offers "slots" for the non-blocking delays you need in your program. Before including the header of one of these two libraries, you have to define the size of the array that means, the number of the delays you need. TIM6 or TIM7 are used as counters at a frequency also defined by … Continue reading TIM6 and TIM7 slotted non-blocking delays
VPC version 3.3.3 update
Small additions, changes and bug fixes. Some triggered a revision and regeneration of all the libraries and the example projects. There are also two new libraries and a demonstration project for them that deserve their own articles. Additions When generating the code, VPC adds some clock values (from the clock settings window) on top of … Continue reading VPC version 3.3.3 update
PCF8583 RTC alarm weekdays example (L152)
Name of the project l152_pcf8583_alarm_weekdays_lcd Description The project demonstrate setting the alarm that will repeat for certain days of the week, at user's choice. Code snippet (initial code, project structure and VSCode files generated by VPC): uint8_t pcf8583_active_alarm = 0; void EXTI15_10_IRQHandler(void) { // Here would be the B1 pin interrupt handler (do where it … Continue reading PCF8583 RTC alarm weekdays example (L152)
PCF8583 RTC alarm daily example (L152)
Name of the project l152_pcf8583_alarm_daily_lcd Description The project demonstrate the setting and use of a daily alarm. The user button is used to stop the alarm. Code snippet (initial code, project structure and VSCode files generated by VPC): uint8_t pcf8583_active_alarm = 0; void EXTI15_10_IRQHandler(void) { // Here would be the B1 pin interrupt handler (do … Continue reading PCF8583 RTC alarm daily example (L152)
PCF8583 RTC examples (L152)
Name of the projects l152_pcf8583_watch_lcdl152_pcf8583_watch_lcd_sw_i2c Description The projects shows on a 2x16 LCD the current hour and date that are read from a PCF8583 RTC IC connected on hardware or software I2C. Code snippet (initial code, project structure and VSCode files generated by VPC): uint8_t s[4]; // buffer used for conversions int main(void) { /* … Continue reading PCF8583 RTC examples (L152)
DS18B20 multiple temperature sensors (l152)
Name of the project l152_ds18b20_multiple Description The project query two DS18B20 Dallas temperature sensors over a 1-wire bus, using their own unique ID's (see here how to get the ID of a sensor). If the sensors are present, the temperatures are shown on the first row of a 2×16 LCD. If not, error messages will … Continue reading DS18B20 multiple temperature sensors (l152)
MAX44009 LUX sensor examples (L152)
Name of the projects l152_max44009_hw_i2cl152_max44009_sw_i2c Description The projects send data to a PC via a serial connection from a LUX light sensor that is read via a hardware or software I2C. Code snippet (initial code, project structure and VSCode files generated by VPC - only one project presented here): char t32_buff[25]; const uint8_t str1[] = … Continue reading MAX44009 LUX sensor examples (L152)
DS18B20 single temperature sensor (l152)
Name of the project l152_ds18b20_single Description The project query a single DS18B20 Dallas temperature sensor over a 1-wire bus. If the sensor is present, the temperature and it's ID will be shown on a 2x16 LCD. If not, error messages will be displayed on the second row of the LCD. Code snippet (initial code, project … Continue reading DS18B20 single temperature sensor (l152)
UART Hello World example (L152)
Name of the project l152_uart_hello Description The project will sent the "Hello World!" phrase via serial at every 1000 milliseconds at a speed of 19200 bps. Code snippet (initial code, project structure and VSCode files generated by VPC): const uint8_t str[] = "Hello World!\r\n"; int main(void){ /* local variables */ /* mandatory system initializations */ … Continue reading UART Hello World example (L152)