Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about all_device_types_app example (CON-1510) #1241

Open
tien1608 opened this issue Jan 13, 2025 · 2 comments
Open

Question about all_device_types_app example (CON-1510) #1241

tien1608 opened this issue Jan 13, 2025 · 2 comments

Comments

@tien1608
Copy link

I am trying all_device_types_app example. When I want to choose a light or fan device, how do I know which GPIO to connect the LED or fan to?

@github-actions github-actions bot changed the title Question about all_device_types_app example Question about all_device_types_app example (CON-1510) Jan 13, 2025
@Jerry-ESP
Copy link
Contributor

Jerry-ESP commented Jan 14, 2025

I am trying all_device_types_app example. When I want to choose a light or fan device, how do I know which GPIO to connect the LED or fan to?

Hi @tien1608 ,
In the all_device_types_app example, there is only the driver of the fan, you can config the fan control GPIO in the menuconfig, include CONFIG_STEP_MOTOR_A0_GPIO, CONFIG_STEP_MOTOR_A1_GPIO, CONFIG_STEP_MOTOR_B0_GPIO and CONFIG_STEP_MOTOR_B1_GPIO.

And there is no light driver in this example, if you want to control a actual light, you can refer to the light example. It can be set through this option: CONFIG_BSP_LED_RGB_GPIO, and the default light GPIO is the devkit's light GPIO, for esp32c3, it is GPIO8.

If you want to add the light driver in the all_device_types_app example, you can refer to the fan driver logic in the all_device_types_app/main/app_driver.cpp.

@tien1608
Copy link
Author

I am trying all_device_types_app example. When I want to choose a light or fan device, how do I know which GPIO to connect the LED or fan to?

Hi @tien1608 , In the all_device_types_app example, there is only the driver of the fan, you can config the fan control GPIO in the menuconfig, include CONFIG_STEP_MOTOR_A0_GPIO, CONFIG_STEP_MOTOR_A1_GPIO, CONFIG_STEP_MOTOR_B0_GPIO and CONFIG_STEP_MOTOR_B1_GPIO.

And there is no light driver in this example, if you want to control a actual light, you can refer to the light example. It can be set through this option: CONFIG_BSP_LED_RGB_GPIO, and the default light GPIO is the devkit's light GPIO, for esp32c3, it is GPIO8.

If you want to add the light driver in the all_device_types_app example, you can refer to the fan driver logic in the all_device_types_app/main/app_driver.cpp.

@Jerry-ESP Thank you, what motor or fan and driver can I use to illustrate this example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants