Can I use the simhu...
 
Notifications
Clear all

Can I use the simhub sketch to use along with my own?

9 Posts
6 Users
0 Reactions
1,585 Views
(@freyls)
New Member
Joined: 2 years ago
Posts: 1
Topic starter  

I want to make a project, and it's required my own arduino sketch, but i also wanna use simhub effects(like ws2812b) on one arduino pro micro(ATmega 32U4).

P.S:I know about custom serial communication but i don't want to write my own effects.


   
Quote
 fgnq
(@fgnq)
Active Member
Joined: 3 years ago
Posts: 11
 

Si consiguieras la programacion que manda simhub al arduino, solo tendrias que unir los 2 codigos, pero me temo que no la podras conseguir.

 

Saludos.


   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

hello,

i dont know how "inject" simhub effect to your sketch but i know how to inject your sketch in Simhub if needed: SHcustomProtocol.h allow you to inject code in Simhub


   
ReplyQuote
(@dadima)
Active Member
Joined: 2 years ago
Posts: 12
 
Posted by: @sgeg

hello,

i dont know how "inject" simhub effect to your sketch but i know how to inject your sketch in Simhub if needed: SHcustomProtocol.h allow you to inject code in Simhub

Hi there. I'm new to SHCustomProtocol.h but were able to make use of it for my custom code. Could I use the code I made in the SHCustomProtocol and at the same time use the built-in effect available in the simhub pwm motor, such as road impact/road vibration effect?

Thanks in advance


   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

Hello,

yes that will not change your simhub setting!

just respect the usual void setup() { // ... } void loop() { // ... } that are already in place. 

dont delete any other lines that Simhub need

compile your code to be sure that there is no conflict between your code and simhub


   
ReplyQuote
(@dadima)
Active Member
Joined: 2 years ago
Posts: 12
 

@sgeg, that's cool. I might try to hook into that later on. Thanks for the clarifications.


   
ReplyQuote
 sgeg
(@sgeg)
Trusted Member
Joined: 3 years ago
Posts: 52
 

@dadima
careful when you updade simhub that will delete the custom file so dont forget to save it some where before updade


   
ReplyQuote
(@dadima)
Active Member
Joined: 2 years ago
Posts: 12
 
Posted by: @sgeg

@dadima
careful when you updade simhub that will delete the custom file so dont forget to save it some where before updade

Thanks for reminding. Yes, I'm aware about that and already did the backup before changing with the code.

Thank you


   
ReplyQuote
(@dreaso)
New Member
Joined: 1 year ago
Posts: 1
 

I have a similar problem. I'm using two arduinos connected to each other via i2c. I'm in need for much pins for my project and the use of gpio expanders does not work. I have a nicely running system and the last part are the rev lights... i've tried to implement my sketch into the simhub one, but i have to do a task in reading from the i2c bus and sadly that does not seem to work.

 

Any ideas how to use the simhub ws2812b part of the simhub sketch as standalone version, so that i could implement that into my program?

Is there any alternative to the simhub sketch to use rev lights?

 

Regards

Andreas


   
ReplyQuote
Share: