-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1226dcf
Showing
63 changed files
with
5,851 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/****************************************************************************** | ||
* @file OD_kelvin | ||
* @brief object dictionnary managing kelvin color convesion over the standard Illuminance OD | ||
* @author Nicolas Rabault | ||
* @version 0.0.0 | ||
******************************************************************************/ | ||
#ifndef OD_OD_KELVIN_H_ | ||
#define OD_OD_KELVIN_H_ | ||
|
||
#include <math.h> | ||
#include "od_illuminance.h" | ||
|
||
static inline color_t IlluminanceOD_ColorFrom_Kelvin(float kelvin) | ||
{ | ||
color_t color; | ||
float temp = kelvin / 100; | ||
float red, green, blue; | ||
|
||
if (temp <= 66) | ||
{ | ||
red = 255; | ||
green = temp; | ||
green = 99.4708025861 * log(green) - 161.1195681661; | ||
if (temp <= 19) | ||
{ | ||
blue = 0; | ||
} | ||
else | ||
{ | ||
blue = temp - 10; | ||
blue = 138.5177312231 * log(blue) - 305.0447927307; | ||
} | ||
} | ||
else | ||
{ | ||
red = temp - 60; | ||
red = 329.698727446 * pow(red, -0.1332047592); | ||
green = temp - 60; | ||
green = 288.1221695283 * pow(green, -0.0755148492); | ||
blue = 255; | ||
} | ||
|
||
color.r = (uint8_t)red; | ||
color.g = (uint8_t)green; | ||
color.b = (uint8_t)blue; | ||
|
||
return color; | ||
} | ||
|
||
#endif /* OD_OD_KELVIN_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<a href="https://luos.io"><img src="https://uploads-ssl.webflow.com/601a78a2b5d030260a40b7ad/603e0cc45afbb50963aa85f2_Gif%20noir%20rect.gif" alt="Luos logo" title="Luos" align="right" height="100" /></a> | ||
|
||
 | ||
[](https://github.com/Luos-io/luos_engine/blob/master/LICENSE) | ||
[](https://www.luos.io/docs) | ||
[](https://www.luos.io) | ||
[](https://registry.platformio.org/libraries/luos/luos_engine) | ||
|
||
[](http://bit.ly/JoinLuosDiscord) | ||
[](https://www.reddit.com/r/Luos) | ||
|
||
Version: 2.9.0 | ||
|
||
# Luos Technology | ||
## The most for the developer | ||
Luos provides a simple way to think your hardware products as a group of independant features. You can easily manage and share your hardware products' features with your team, external developers, or with the community. Luos is an open-source lightweight library that can be used on any MCU, leading to free and fast multi-electronic-boards products development. Choosing Luos to design a product will help you to develop, debug, validate, monitor, and manage it from the cloud. | ||
|
||
## The most for the community | ||
Most of the embedded developments are made from scratch. By using Luos, you will be able to capitalize on the development you, your company, or the Luos community already did. The re-usability of features encapsulated in Luos services will fasten the time your products reach the market and reassure the robustness and the universality of your applications. | ||
|
||
* → Join the [Luos Discord server](http://discord.gg/luos) | ||
* → Join the [Luos subreddit](https://www.reddit.com/r/Luos) | ||
|
||
## Good practices with Luos | ||
Luos proposes organized and effective development practices, guaranteeing development flexibility and evolutivity of your hardware product, from the idea to the maintenance of the industrialized product fleet. | ||
|
||
## Let's do this | ||
|
||
* → Try on your own with the [get started](https://www.luos.io/tutorials/get-started) | ||
* → Consult the full [documentation](https://www.luos.io/docs) | ||
|
||
## Disclaimer | ||
Using Platformio, this library compilation send some anonymous information to Luos allowing to improve Luos_engine experience. | ||
To disable the telemetry please add "-DNOTELEMETRY" as a compilation flag on your platformio.ini file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,201 @@ | ||
#MicroXplorer Configuration settings - do not modify | ||
Dma.Request0=TIM2_CH1 | ||
Dma.RequestsNb=1 | ||
Dma.TIM2_CH1.0.Direction=DMA_MEMORY_TO_PERIPH | ||
Dma.TIM2_CH1.0.Instance=DMA1_Channel5 | ||
Dma.TIM2_CH1.0.MemDataAlignment=DMA_MDATAALIGN_BYTE | ||
Dma.TIM2_CH1.0.MemInc=DMA_MINC_ENABLE | ||
Dma.TIM2_CH1.0.Mode=DMA_CIRCULAR | ||
Dma.TIM2_CH1.0.PeriphDataAlignment=DMA_PDATAALIGN_WORD | ||
Dma.TIM2_CH1.0.PeriphInc=DMA_PINC_DISABLE | ||
Dma.TIM2_CH1.0.Priority=DMA_PRIORITY_LOW | ||
Dma.TIM2_CH1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority | ||
File.Version=6 | ||
KeepUserPlacement=false | ||
Mcu.Family=STM32F0 | ||
Mcu.IP0=DMA | ||
Mcu.IP1=NVIC | ||
Mcu.IP2=RCC | ||
Mcu.IP3=SYS | ||
Mcu.IP4=TIM2 | ||
Mcu.IP5=USART1 | ||
Mcu.IPNb=6 | ||
Mcu.Name=STM32F072C(8-B)Ux | ||
Mcu.Package=UFQFPN48 | ||
Mcu.Pin0=PA0 | ||
Mcu.Pin1=PA2 | ||
Mcu.Pin10=PA8 | ||
Mcu.Pin11=PA9 | ||
Mcu.Pin12=PA10 | ||
Mcu.Pin13=PB3 | ||
Mcu.Pin14=VP_SYS_VS_Systick | ||
Mcu.Pin2=PA3 | ||
Mcu.Pin3=PA5 | ||
Mcu.Pin4=PA6 | ||
Mcu.Pin5=PB10 | ||
Mcu.Pin6=PB11 | ||
Mcu.Pin7=PB13 | ||
Mcu.Pin8=PB14 | ||
Mcu.Pin9=PB15 | ||
Mcu.PinsNb=15 | ||
Mcu.ThirdPartyNb=0 | ||
Mcu.UserConstants= | ||
Mcu.UserName=STM32F072CBUx | ||
MxCube.Version=5.1.0 | ||
MxDb.Version=DB.5.0.10 | ||
NVIC.DMA1_Channel4_5_6_7_IRQn=true\:1\:0\:true\:false\:true\:false\:true | ||
NVIC.EXTI4_15_IRQn=true\:0\:0\:false\:false\:true\:true\:true | ||
NVIC.ForceEnableDMAVector=true | ||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false | ||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false | ||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false | ||
NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false | ||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true | ||
NVIC.USART1_IRQn=true\:0\:0\:false\:false\:false\:true\:true | ||
PA0.GPIOParameters=GPIO_Label | ||
PA0.GPIO_Label=S1 | ||
PA0.Locked=true | ||
PA0.Signal=S_TIM2_CH1_ETR | ||
PA10.GPIOParameters=GPIO_PuPd,GPIO_Label | ||
PA10.GPIO_Label=COM_RX | ||
PA10.GPIO_PuPd=GPIO_PULLUP | ||
PA10.Locked=true | ||
PA10.Mode=Asynchronous | ||
PA10.Signal=USART1_RX | ||
PA2.GPIOParameters=GPIO_Label | ||
PA2.GPIO_Label=POWER_SENSOR | ||
PA2.Locked=true | ||
PA2.Signal=ADC_IN2 | ||
PA3.GPIOParameters=PinState,GPIO_Label | ||
PA3.GPIO_Label=LED | ||
PA3.Locked=true | ||
PA3.PinState=GPIO_PIN_SET | ||
PA3.Signal=GPIO_Output | ||
PA5.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label | ||
PA5.GPIO_Label=COM_LVL_DOWN | ||
PA5.GPIO_PuPd=GPIO_PULLUP | ||
PA5.Locked=true | ||
PA5.PinState=GPIO_PIN_RESET | ||
PA5.Signal=GPIO_Output | ||
PA6.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label | ||
PA6.GPIO_Label=COM_LVL_UP | ||
PA6.GPIO_PuPd=GPIO_PULLDOWN | ||
PA6.Locked=true | ||
PA6.PinState=GPIO_PIN_SET | ||
PA6.Signal=GPIO_Output | ||
PA8.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI | ||
PA8.GPIO_Label=PTPA | ||
PA8.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING | ||
PA8.GPIO_PuPd=GPIO_PULLUP | ||
PA8.Locked=true | ||
PA8.Signal=SharedStack_PA8 | ||
PA8.Stacked=true | ||
PA9.GPIOParameters=GPIO_PuPd,GPIO_Label | ||
PA9.GPIO_Label=COM_TX | ||
PA9.GPIO_PuPd=GPIO_PULLUP | ||
PA9.Locked=true | ||
PA9.Mode=Asynchronous | ||
PA9.Signal=USART1_TX | ||
PB10.GPIOParameters=GPIO_Label | ||
PB10.GPIO_Label=S3 | ||
PB10.Locked=true | ||
PB10.Signal=S_TIM2_CH3 | ||
PB11.GPIOParameters=GPIO_Label | ||
PB11.GPIO_Label=S4 | ||
PB11.Locked=true | ||
PB11.Signal=S_TIM2_CH4 | ||
PB13.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI | ||
PB13.GPIO_Label=PTPB | ||
PB13.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING | ||
PB13.GPIO_PuPd=GPIO_PULLUP | ||
PB13.Locked=true | ||
PB13.Signal=SharedStack_PB13 | ||
PB13.Stacked=true | ||
PB14.GPIOParameters=GPIO_Label | ||
PB14.GPIO_Label=RX_EN | ||
PB14.Locked=true | ||
PB14.Signal=GPIO_Output | ||
PB15.GPIOParameters=GPIO_Label | ||
PB15.GPIO_Label=TX_EN | ||
PB15.Locked=true | ||
PB15.Signal=GPIO_Output | ||
PB3.GPIOParameters=GPIO_Label | ||
PB3.GPIO_Label=S2 | ||
PB3.Locked=true | ||
PB3.Signal=S_TIM2_CH2 | ||
PinOutPanel.RotationAngle=0 | ||
ProjectManager.AskForMigrate=true | ||
ProjectManager.BackupPrevious=false | ||
ProjectManager.CompilerOptimize=3 | ||
ProjectManager.ComputerToolchain=false | ||
ProjectManager.CoupleFile=true | ||
ProjectManager.CustomerFirmwarePackage= | ||
ProjectManager.DefaultFWLocation=true | ||
ProjectManager.DeletePrevious=true | ||
ProjectManager.DeviceId=STM32F072CBUx | ||
ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.9.0 | ||
ProjectManager.FreePins=false | ||
ProjectManager.HalAssertFull=false | ||
ProjectManager.HeapSize=0x200 | ||
ProjectManager.KeepUserCode=true | ||
ProjectManager.LastFirmware=true | ||
ProjectManager.LibraryCopy=1 | ||
ProjectManager.MainLocation=Src | ||
ProjectManager.NoMain=false | ||
ProjectManager.PreviousToolchain=SW4STM32 | ||
ProjectManager.ProjectBuild=false | ||
ProjectManager.ProjectFileName=Led_strip.ioc | ||
ProjectManager.ProjectName=Led_strip | ||
ProjectManager.RegisterCallBack= | ||
ProjectManager.StackSize=0x400 | ||
ProjectManager.TargetToolchain=Other Toolchains (GPDSC) | ||
ProjectManager.ToolChainLocation= | ||
ProjectManager.UnderRoot=false | ||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-SystemClock_Config-RCC-false-HAL-false,4-MX_USART1_UART_Init-USART1-false-LL-true,5-MX_TIM2_Init-TIM2-false-HAL-true | ||
RCC.AHBFreq_Value=48000000 | ||
RCC.APB1Freq_Value=48000000 | ||
RCC.APB1TimFreq_Value=48000000 | ||
RCC.CECFreq_Value=32786.88524590164 | ||
RCC.FCLKCortexFreq_Value=48000000 | ||
RCC.FamilyName=M | ||
RCC.HCLKFreq_Value=48000000 | ||
RCC.HSICECFreq_Value=32786.88524590164 | ||
RCC.I2SFreq_Value=48000000 | ||
RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,CECFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSICECFreq_Value,I2SFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USART1Freq_Value,USART2Freq_Value,VCOOutput2Freq_Value | ||
RCC.MCOFreq_Value=48000000 | ||
RCC.PLLCLKFreq_Value=48000000 | ||
RCC.PLLMCOFreq_Value=48000000 | ||
RCC.PLLMUL=RCC_PLL_MUL6 | ||
RCC.SYSCLKFreq_VALUE=48000000 | ||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK | ||
RCC.TimSysFreq_Value=48000000 | ||
RCC.USART1Freq_Value=48000000 | ||
RCC.USART2Freq_Value=48000000 | ||
RCC.VCOOutput2Freq_Value=8000000 | ||
SH.S_TIM2_CH1_ETR.0=TIM2_CH1,PWM Generation1 CH1 | ||
SH.S_TIM2_CH1_ETR.ConfNb=1 | ||
SH.S_TIM2_CH2.0=TIM2_CH2 | ||
SH.S_TIM2_CH2.ConfNb=1 | ||
SH.S_TIM2_CH3.0=TIM2_CH3 | ||
SH.S_TIM2_CH3.ConfNb=1 | ||
SH.S_TIM2_CH4.0=TIM2_CH4 | ||
SH.S_TIM2_CH4.ConfNb=1 | ||
SH.SharedStack_PA8.0=GPIO_Output+0 | ||
SH.SharedStack_PA8.1=GPIO_EXTI8 | ||
SH.SharedStack_PA8.ConfNb=2 | ||
SH.SharedStack_PB13.0=GPIO_Output+0 | ||
SH.SharedStack_PB13.1=GPIO_EXTI13 | ||
SH.SharedStack_PB13.ConfNb=2 | ||
TIM2.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1 | ||
TIM2.IPParameters=Channel-PWM Generation1 CH1,Prescaler,Period,OCPolarity_1,OCMode_PWM-PWM Generation1 CH1,Pulse-PWM Generation1 CH1 | ||
TIM2.OCMode_PWM-PWM\ Generation1\ CH1=TIM_OCMODE_PWM1 | ||
TIM2.OCPolarity_1=TIM_OCPOLARITY_HIGH | ||
TIM2.Period=60 -1 | ||
TIM2.Prescaler=0 | ||
TIM2.Pulse-PWM\ Generation1\ CH1=0 | ||
USART1.BaudRate=57600 | ||
USART1.IPParameters=VirtualMode-Asynchronous,BaudRate | ||
USART1.VirtualMode-Asynchronous=VM_ASYNC | ||
VP_SYS_VS_Systick.Mode=SysTick | ||
VP_SYS_VS_Systick.Signal=SYS_VS_Systick | ||
board=custom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<a href="https://luos.io"><img src="https://uploads-ssl.webflow.com/601a78a2b5d030260a40b7ad/603e0cc45afbb50963aa85f2_Gif%20noir%20rect.gif" alt="Luos logo" title="Luos" align="right" height="100" /></a> | ||
|
||
 | ||
[](https://github.com/Luos-io/luos_engine/blob/master/LICENSE) | ||
|
||
[](https://www.luos.io) | ||
[](https://luos.io) | ||
[](https://registry.platformio.org/libraries/luos_engine/luos_engine) | ||
|
||
[](https://discord.gg/luos) | ||
[](https://www.reddit.com/r/Luos) | ||
[](https://twitter.com/Luos_io) | ||
[](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fluos-io) | ||
|
||
|
||
|
||
# LED strip project example :bulb: | ||
This project demonstrate how to make and use a simple LED strip through Luos. Feel free to use electronics and code example as you want. | ||
|
||
## How to compile the code :computer: | ||
|
||
1. Download and install [Platformio](https://platformio.org/platformio-ide) | ||
2. Open this folder into Platformio | ||
3. Build (Platformio will do the rest) | ||
|
||
## How to open the electronic design :electric_plug: | ||
You can open [a working example electronic design](https://github.com/Luos-io/luos_engine/tree/main/examples/hardware) with Kicad. This design use Luos_components library for more information to install and use it read [our doc](https://www.luos.io/docs/luos-technology). | ||
|
||
## Linked driver | ||
This project is linked to the [Led strip driver](../../Drivers/led_strip). | ||
|
||
## Don't hesitate to read [our documentation](https://www.luos.io/docs/luos-technology), or to post your questions/issues on the [Luos' community](https://discord.gg/luos). :books: | ||
|
||
[](https://discord.gg/luos) | ||
[](https://www.luos.io) | ||
[](https://www.linkedin.com/company/luos) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"build": { | ||
"cpu": "cortex-m0", | ||
"extra_flags": [ | ||
"-DSTM32F072xB", | ||
"-DUSE_HAL_DRIVER", | ||
"-DUSE_FULL_LL_DRIVER", | ||
"-DLUOSHAL=STM32F0 " | ||
], | ||
"f_cpu": "48000000L", | ||
"mcu": "stm32f072vbt6", | ||
"product_line": "STM32F072XB" | ||
}, | ||
"connectivity": [ | ||
"can" | ||
], | ||
"debug": { | ||
"jlink_device": "STM32F072VB", | ||
"openocd_target": "stm32f0x", | ||
"svd_path": "STM32F072x.svd" | ||
}, | ||
"frameworks": [ | ||
"stm32cube" | ||
], | ||
"name": "L0", | ||
"upload": { | ||
"maximum_ram_size": 16384, | ||
"maximum_size": 131072, | ||
"protocol": "dfu", | ||
"protocols": [ | ||
"stlink", | ||
"dfu" | ||
] | ||
}, | ||
"url": "https://luos.io", | ||
"vendor": "Luos" | ||
} |
Oops, something went wrong.