April 26, 2024
71 Guests and Online

Please consider Sign Uping
guest

sp_LogInOut Log In sp_Registration Sign Up

Sign Up | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

HookUpSpot
What are you doing?
June 28, 2021
6:07 pm
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline

Psyral Infection said

jiggles the clown said
pulling my god damn hair out trying to figure out this code. 

I don't wanna get too technical, but making an LED blink a pattern, or do morse code or something, is a lot fucking harder than it looks without using the delay() function, which sucks for code because it literally pauses the code for however many miliseconds you tell it to delay for - which means it can't do anything else.  

I am assuming you are using C++.  Since you don't have a good way to multi-thread, you can use a main loop methodology. 

Not sure what your required logic is but the idea is you never use any delay(). It will require some time calculations. If it was morse code, you could setup an array of time deltas between a toggleLight() function. The loops checks the amount of time passed and if it is more than the next time delta in the queue, then call toggleLight().  

Again, not sure what you are making exactly, but if the project has many possible actions that can be handled, you may want to go further and turn the main loop into a message queue handler.

Unfortunately, the Arduino does not have a great way to multithread so you have to resort to a main loop or even a main loop message queue handler.

If you want any assistance, let me know. I have been coding for a living for close to 30 years. While c++ is not my language of choice (I like c#), I can most likely still help.  

I'm not actually sure what language arduino uses exactly, I think either c or c++.

 

right now I'm working on a mod for a warhammer valkyrie to control LEDs and MP3 files through a miniDFplayer, controlled via bluetooth, currently what I have is some LEDs that I can turn on/off, and I can access MP3 files from the DF player on command. I think i found some decent code that i can modify to make work here; https://techtotinker.blogspot.com/2020/08/sos-flasher-using-millis-function-with.html but I can't test it right now since my workshop is too fucking hot in this PNW bullshit weather right now.

quote me to trigger a Canadian child molester

June 28, 2021
7:13 pm
Avatar
Psyral
#ModBot
Moderator
Members

Moderators
Forum Posts: 4297
Member Since:
February 15, 2014
sp_UserOfflineSmall Offline
2442sp_Permalink sp_Print

jiggles the clown said
I'm not actually sure what language arduino uses exactly, I think either c or c++.
 

right now I'm working on a mod for a warhammer valkyrie to control LEDs and MP3 files through a miniDFplayer, controlled via bluetooth, currently what I have is some LEDs that I can turn on/off, and I can access MP3 files from the DF player on command. I think i found some decent code that i can modify to make work here; https://techtotinker.blogspot.com/2020/08/sos-flasher-using-millis-function-with.html but I can't test it right now since my workshop is too fucking hot in this PNW bullshit weather right now.  

That blog post is great code. That is the main loop idea perfectly.  I think you got this. 

I would love to see a vid of the final project afterwards.

(click image for source)   Yeah.gif   (click image for source)
June 28, 2021
7:18 pm
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2443sp_Permalink sp_Print

Psyral Infection said

That blog post is great code. That is the main loop idea perfectly.  I think you got this. 

I would love to see a vid of the final project afterwards.  

Oh, yeah. My plan is once i get the code working and learn how to code a bit better, to try to turn this into a side hustle. I've got 3-4 ideas for personal projects that I planned on using as proof of concept, so I fully intend on showing this shit off.

Whoop Whoop jiggles the clown :

Psyral

quote me to trigger a Canadian child molester

June 30, 2021
12:33 am
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2444sp_Permalink sp_Print

just got all my code fucking FINISHED.

 

There's still work to do, mostly with specifics and hardware stuff; figure out how much power the damn thing needs, decide how many lights I want on the model, how many I want blinking, patterns, etc.  If I want a better/louder speaker or not. and then I gotta implement everything into the model itself.

 

But, the code. the hard part, that I've been working on for 10~ days, is god damn DONE. I couldn't be fucking happier.

Whoop Whoop jiggles the clown :

Psyral

quote me to trigger a Canadian child molester

June 30, 2021
12:30 pm
Skratchie
Skratchie
Member
Members
Forum Posts: 277
Member Since:
August 13, 2014
sp_UserOfflineSmall Offline
2445sp_Permalink sp_Print

I can't test it right now since my workshop is too fucking hot in this PNW bullshit weather right now.  

Dude, that weekend was fuckin brutal. Even the wind was hot...

June 30, 2021
12:44 pm
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2446sp_Permalink sp_Print

Skratchie said

I can't test it right now since my workshop is too fucking hot in this PNW bullshit weather right now.  

Dude, that weekend was fuckin brutal. Even the wind was hot...  

Yeah, I'm glad it's over. My breaker flipped at least once every day that weekend, and the electrician couldn't come in until yesterday to look at it; apparently we have an older system and they need to replace the whole damn thing. would've been nice to get that done before the 113~ weather.

quote me to trigger a Canadian child molester

July 2, 2021
9:23 pm
Avatar
the_patriot_smack
Moe Ray Al
Member
Members
Forum Posts: 4480
Member Since:
March 30, 2018
sp_UserOfflineSmall Offline
2447sp_Permalink sp_Print

downloaded an app called card castle on my phone and I spent the past few hours scanning magic the gathering cards only scanned a couple of hundred so far and found lots of $10+ cards and a few $40 cards I still have thousands more to scan I been buying them for over 25 years now and just hoarded them in longboxes until now.

I wish I did the same thing with pokemon cards

THE ALMIGHTY SMACK

July 3, 2021
1:02 am
Old Mr Dangerous
Old Mr Dangerous
Member
Members
Forum Posts: 9041
Member Since:
March 30, 2013
sp_UserOfflineSmall Offline
2448sp_Permalink sp_Print

I'm currently fucking a sheep cus I'm a b-aaa-aaa-aaa-d motherfucker!

July 3, 2021
1:49 am
Avatar
the_patriot_smack
Moe Ray Al
Member
Members
Forum Posts: 4480
Member Since:
March 30, 2018
sp_UserOfflineSmall Offline
2449sp_Permalink sp_Print

Old Mr Dangerous said
I'm currently fucking a sheep cus I'm a b-aaa-aaa-aaa-d motherfucker!  

considering you are who you are

that comes off as a cringe

you raping an animal does not seem out of place

fits your character perfectly

Whoop Whoop the_patriot_smack :

Old Mr Dangerous

THE ALMIGHTY SMACK

July 6, 2021
12:28 am
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2450sp_Permalink sp_Print

on the final stretch for this first warhammer mod. just making sure everything works as intended and gotta finish painting the model before i slap everything together. Excited to get it done. should be able to finish it by the end of the week. then i've got like... 5 more that I'm planning out.

Whoop Whoop jiggles the clown :

Psyral

quote me to trigger a Canadian child molester

July 9, 2021
8:57 pm
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2451sp_Permalink sp_Print

turned out i fucked up and bought the wrong arduino initially; was working with arduino nano but what i really needed was an arduino mini pro; minor fuck up since all it requires is buying different chips and slightly changing some of the code, but I'm a little annoyed at myself for buying the wrong shit.

 

that said, I'm taking the time to work on the code of my other projects, deciding how simple or complicated I want some of them to be.

quote me to trigger a Canadian child molester

July 11, 2021
9:07 am
Old Mr Dangerous
Old Mr Dangerous
Member
Members
Forum Posts: 9041
Member Since:
March 30, 2013
sp_UserOfflineSmall Offline
2452sp_Permalink sp_Print

Wondering when the lineup for GOTJ 2021 is going to be released. 

All I heard is the PSY roster and Kissing Candice.

July 11, 2021
10:45 am
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2453sp_Permalink sp_Print

Old Mr Dangerous said
Wondering when the lineup for GOTJ 2021 is going to be released. 

All I heard is the PSY roster and Kissing Candice.  

honestly i almost wouldn't be surprised if thats all they had coming. it's, what? like a month and a half away and thats all they have announced so far?

quote me to trigger a Canadian child molester

July 11, 2021
10:05 pm
Old Mr Dangerous
Old Mr Dangerous
Member
Members
Forum Posts: 9041
Member Since:
March 30, 2013
sp_UserOfflineSmall Offline
2454sp_Permalink sp_Print

jiggles the clown said

honestly i almost wouldn't be surprised if thats all they had coming. it's, what? like a month and a half away and thats all they have announced so far?  

I dunno. Tone Loc and Young MC just played this little Eastern Colorado plains spot a few nights ago.. no reason why they can't hit up GOTJ!

For real... it's a travesty that we don't have a list yet. Once again, 

I KNOW it's all about the family 

I KNOW it's all about the togetherness 

I KNOW it's not about who is or isn't playing this stage or that stage

 

HOWEVER 

.

. ..... I still want to know

Whoop Whoop Old Mr Dangerous :

the_patriot_smack
July 12, 2021
4:54 am
MASTERWEEDO
MASTERWEEDO
Member
Members
Forum Posts: 1199
Member Since:
May 13, 2013
sp_UserOfflineSmall Offline
2455sp_Permalink sp_Print

They just posted Struggle Jennings tour dates, his ends just before GOTJ, as dows RA the Rugged Man's tour. Jelly Roll has a show on the 20th in Irving TX. Im guessing those 3 have some stage time at the Gathering.

Whoop Whoop MASTERWEEDO :

Psyral, Old Mr Dangerous
July 12, 2021
8:03 am
Old Mr Dangerous
Old Mr Dangerous
Member
Members
Forum Posts: 9041
Member Since:
March 30, 2013
sp_UserOfflineSmall Offline
2456sp_Permalink sp_Print

MASTERWEEDO said
They just posted Struggle Jennings tour dates, his ends just before GOTJ, as dows RA the Rugged Man's tour. Jelly Roll has a show on the 20th in Irving TX. Im guessing those 3 have some stage time at the Gathering.  

Hopefully the Jelly Roll/ICP/Ouija/Twiztid beef is over with. Twiztid really made fools of themselves on Twitter, barging in on Jellyroll and ICP's business. This was 2 years ago.

Either way, those 3 would be excellent fits. 

Whoop Whoop Old Mr Dangerous :

MASTERWEEDO
July 12, 2021
8:14 am
MASTERWEEDO
MASTERWEEDO
Member
Members
Forum Posts: 1199
Member Since:
May 13, 2013
sp_UserOfflineSmall Offline
2457sp_Permalink sp_Print

I just found out I need surgery the week after the Gathering [26th] to get the stents out of my liver and pancreas. It was either that or the 17th. I just hope I don't get sick after I get home. I'm kinda pissed, I wanted to take my dad to a KISS concert on the 26th.

July 12, 2021
8:29 am
Old Mr Dangerous
Old Mr Dangerous
Member
Members
Forum Posts: 9041
Member Since:
March 30, 2013
sp_UserOfflineSmall Offline
2458sp_Permalink sp_Print

MASTERWEEDO said
I just found out I need surgery the week after the Gathering [26th] to get the stents out of my liver and pancreas. It was either that or the 17th. I just hope I don't get sick after I get home. I'm kinda pissed, I wanted to take my dad to a KISS concert on the 26th.  

Christ Almighty, dawg... hang in there!

July 12, 2021
10:35 am
MASTERWEEDO
MASTERWEEDO
Member
Members
Forum Posts: 1199
Member Since:
May 13, 2013
sp_UserOfflineSmall Offline
2459sp_Permalink sp_Print

Old Mr Dangerous said

Christ Almighty, dawg... hang in there!  

I should be good, this is just them removing the work they did in June. Hopefully I don't go all jaundiced again, that wasn't fun.

July 12, 2021
10:07 pm
jiggles the clown
Member
Members
Forum Posts: 1929
Member Since:
August 23, 2014
sp_UserOfflineSmall Offline
2460sp_Permalink sp_Print

had to take a break from working on my arduino projects because amazon keeps delaying packages and I'm still waiting for some critical components to be delivered.

so instead I worked on this today; Khrone altar of skulls lit by 6 red LEDs(one for each face moulded into the side), with a push-button switch and a micro-USB charging port in the bottom, powered by a 3.7, 250mAh LiPo battery.

PXL_20210712_184007904.jpgImage Enlarger

Whoop Whoop jiggles the clown :

Psyral

quote me to trigger a Canadian child molester

Forum Timezone: America/Chicago

Most Users Ever Online: 591

Currently Online:
94 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

The Warlock: 11663

King Lucem Ferre: 9098

Old Mr Dangerous: 8974

krunk: 8060

OCJ_Brendan: 6148

Member Stats:

Guest Posters: 755

Members: 3743

Moderators: 6

Admins: 2

Forum Stats:

Groups: 5

Forums: 28

Topics: 12299

Posts: 245363

Newest Members:

Nelsonprato, Weed Tinctures, DavidLem, MichaelDes

Moderators: GanjaGoblin: 2873, Psyral: 4297, bozodklown: 394, scruffy: 11447, PunkRockJuggalo: 6559, Pigg: 6492

Administrators: admin: 1, ScottieD: 845