If you are going to have a beefy audio track on the opening credits, can you please balance the audio volume to match your own audio. It plays unbelievably loud. Rise above the YOUTube hype, you are much humbler than that, it is one of your best features.
The Ben Heck Show What you were explaining about cabTemp and cabNet is called atomicity. This is used a lot when dealing with file systems or multi-threading environments. Also being a programmer I'm loving the amount of coding in this with hardware!
I am loving this, has been a project for years I've wanted to do replicate and convert the larger machines (Williams gottlieb) into a portable home tabletop. May still have a go when my 3d printer is built. So thanks Ben nice to see
What would be really neat to make would be a pocket-sized synth/keyboard. You could use a small computer (arduino,raspberry pi,Etc) and install some kind of music writing software, they have a couple of knobs to adjust a few things (pitch bending, LFO rate, low pass filter,Etc) it just sounds like a cool project. Likeliness of you seeing this is incredibly slim, but I thought it was worth bringing up, have an splendid day :)
Instead of using the read, modify, write on the pin registers, can't you use bitbanding? Teensy 3.1 is an ARM Cortex-M right? I'm not a 100% sure, it might be manufacturer dependent or something, but that would allow much faster access to individual pins as every bit in a pin register is aligned and can be accessed individually.
Ben! You should have totally used cstdint to specify fixed width values, like uint16_t. It makes everything so much easier to read, especially on a uC like the teensy.
Ben, you are an animator, but you choose a display that really can't be that animated. I would have loved for this to be a 3 parter, where you improve on ordinary pinball-machines and use a modern LCD/LED display and make a few short animations in full RGB color.
Worth noting: In teensyduino, the author wrote functions called 'digitalwritefast' and 'digitalreadfast' that take only 1 cpu cycle to complete...much faster than default :D (without needing to resort to port addressing)
Robonza Definitely a trade between novice usability and efficiency...I just mentioned that one because ports and bitwise operations are a bit heavy for the beginner and if the other goal is speed then it's already been taken care of :)
I know that there is a low chance of you doing this. But I can't find a lot of videos explaining how to add buttons or hopefully a joystick to a teensy. After this, think you could make a video on adding a joystick and button to teensy?
Any listing is a great and can be improved with feedback over time. As a newb, part numbers and links to items I can buy on E14 are great. Since so some of this is from scrounged parts, substitutions or specs for similar parts would be helpful. I would think over time makers who give it a try will share their own links and sources for scrounged parts or alternative parts as well and it can grow organically. That's my take from someone just stepping into the pool, others who are already knee or hip deep probably don't need as much or have other preferences. I hope that helps.
I'm very interested in making a similar project but have some fundamental questions. How do you turn the closing of a switch (say a stationary target on the play-field being hit by the pinball) into a digital signal that can be used to increase the score? Also how would the same concept work but this time the ball would hit a switch which activates a solenoid (say a kicker)? Thanks!
The Ben Heck Show I might be missing a trick - but on the score 'number' to string code, could you not just use cstr to convert the actual number to an ascii string. Then all you would need is a loop through and replace the 'val' of each -48 to get the ascii values correct. Would read a lot easier I think. Also as a quick thing, don't forget to right justify your score :) (I don't know about Arduino or Teensy code but in the old days of basic you could set the length of string you wanted to return and justify your number in it) - just my 2p worth :) Cheers Wayne.
On the Mosfet, Ben called the diode a 'Fly-back' however I have learnt it as a 'Rerversed Bios'. If this just language diffrence (I am from the UK) or have I learnt it wrong?
Thomas Jarvis _A flyback diode (sometimes called a snubber diode, freewheeling diode, suppressor diode, suppression diode, clamp diode or catch diode) is a diode used to eliminate flyback, which is the sudden voltage spike seen across an inductive load when its supply voltage is suddenly reduced or removed._
Thomas Jarvis No, you learned it right. The reversed biased diode is being used in a fly-back configuration, across the coil in the relay. This is one of the many uses of a reverse-biased diode - flyback voltage spike suppression across a DC-driven inductor. When the MOSFET switches from on to off, the magnetic field in the coil collapses, but while it does, it can generate a substantial reversed voltage spike across the coil. The diode provides a safe way to drain the energy within the coil, thus preventing you from "flying back across the room" from touching a coil that is supposedly "off". Here, it's primarily to protect the MOSFET from damage, but in higher-energy circuits, it can prevent arc events.
Falbert Forester Ah, okay. Thanks. That makes sense now. I have my electronics exam this week and there is always a question on Mosfets or BJTs with an electromagnetic thing, so that very useful.
Hey Ben I've have a pair of broken heads laying around, well they not broken I guess. They still work its just the right plastic thing broke off. I was wondering if you could fix it or even make it better some how. Please send me a message if you can.
Hello I would like to see a video in which you convert a single android tablet into a tablet gamepad as JXD and please send a mail with how make this....
How does he not run into data bottlenecking issues with so few pins? I would put everything on its own port (excluding group operations) but I guess that would make it more complicated.
I haven't finished watching the video yet, but I've gotten to the start of the code portion. Why are you storing the numbers as ASCII values and then subtracting 48 instead of just storing them as integer values to start with?
Hello World! The compiler will optimize away the subtraction so it's just more convenient to let it do the math like that and makes it easier to modify for the programmer.
Cannot recommend the Teensy enough. The price/performance is so far above anything else I have seen in the MCU world. PJRC also has some of the best support for software on their forums.
The Ben Heck Show yeah. personally I prefer Notepad2, which is used more like the original Notepad (IOW: you open a bunch of instances in parallel, with one instance for each file).
Ben, I enjoy your show very much - I think I just finished watching all the past episodes - but the parts where you teach programming are almost impossible to follow: there is not always a good synchronization between what you say and what is shown, there are too many lines of the program that are highlighted at the same time, and by the time the viewer has found what line you are describing, there are some comments that are added at the bottom of the screen... You are going way too fast! And I am a programmer. While the electronic part is much easier to understand, even for me with no prior knowledge of electronic (or a level way more limited than my computer knowledge).
The Ben Heck Show I noticed this too, but this is the first episode in a while that I've watched on my laptop (as opposed to my phone). Maybe eevblog's 60 fps is screwing with me...
Your buildings are so amazing, and i want to build them, but im only 12 Years old, and cant build your Projects... Is there any Solution (except asking Elders or Relatives for Help), that i can build your Projects? P.S. Mostly Problems are 3D Printing, the lovely Money. Time is not the Problem
22:30 This is not true! bitRead, bitWrite, bitClear and bitSet are macros in wiring.h (Teensyduino) or in Arduino.h (Arduino), they are bitwise operations, that run just as fast as your functions. For digitalWrite and digitalRead your argument is only true if you run these commands with dynamic parameters otherwise they will be single-cycle instructions.
systemmaster128 There is little correction, writing constant to SFR on ARM or Atmel is not single-cycle instructions (it is possible to be single-cycle instruction only if you have prepared values in general-purpose, which is rarely case) changing one bit on SFR usually take 3 instructions. bitWrite is macro but it use conditional assignment to select which macro it will use (which can be determined during compilation for static parameter if you use some good compiler, GCC dont do that) digitalWrite and digitalRead are never single-cycle instructions (they never cant be even compiled to 3 instructions), and there is no difference if you use dynamic parameters or static parameter.
If you are going to have a beefy audio track on the opening credits, can you please balance the audio volume to match your own audio. It plays unbelievably loud.
Rise above the YOUTube hype, you are much humbler than that, it is one of your best features.
I had to come back to this video to figure out how exactly is this score display working. So brilliant it just blew my mind.
The Ben Heck Show What you were explaining about cabTemp and cabNet is called atomicity. This is used a lot when dealing with file systems or multi-threading environments. Also being a programmer I'm loving the amount of coding in this with hardware!
I am loving this, has been a project for years I've wanted to do replicate and convert the larger machines (Williams gottlieb) into a portable home tabletop. May still have a go when my 3d printer is built. So thanks Ben nice to see
Oh god, back to the parts again >.> lets hope we get part 2 next week and not next month >.>
I loved the "explaining detail" in this episode.
This project is AWESOME! Thanks Ben!
Is it just me that enjoys watching Ben's video's but literally has NO IDEA what he's talking about when he goes all technical?! lol
It's not just you.
Jim Nope. I try though.
I reckon you would enjoy techmoan and 8 bit guy too.
I love the commentated time-lapse.
Very nice! Looking forward to the next episode!
What would be really neat to make would be a pocket-sized synth/keyboard. You could use a small computer (arduino,raspberry pi,Etc) and install some kind of music writing software, they have a couple of knobs to adjust a few things (pitch bending, LFO rate, low pass filter,Etc) it just sounds like a cool project.
Likeliness of you seeing this is incredibly slim, but I thought it was worth bringing up, have an splendid day :)
he's a pinball wizard
The Leithal Gamer there has to be a twist..
The Ben Heck Show A pinball wizard's got such a supple wrist
The Leithal Gamer How do you think he does it?
sonicase
What makes him so good?
"Too much input stefanie" .... unlike Number 5 .... MY HEAD exploded with the information in this video!!!!!
Hoping you share plans for this on Element 14 with parts list. I'd love to build my own as my first homebrew!
VacFink We've been wondering how best to present component lists and such on the community, if you have any ideas we'd like to hear them.
Man, the new intro is so cool!
Instead of using the read, modify, write on the pin registers, can't you use bitbanding? Teensy 3.1 is an ARM Cortex-M right? I'm not a 100% sure, it might be manufacturer dependent or something, but that would allow much faster access to individual pins as every bit in a pin register is aligned and can be accessed individually.
high speed cam shot of the screen would be amazing!!
Wow! There was a lot of info crammed in that video! :-) good job dude!
Ben! You should have totally used cstdint to specify fixed width values, like uint16_t. It makes everything so much easier to read, especially on a uC like the teensy.
This is a good video....could just about follow it with the bits n registers!
Very nice detailed method , keep up the good work and keep those details comming , you fans from London .
Gotta love the explicit "in two weeks!" comment, especially after the Dreamcast outcries ;)
Ben, you are an animator, but you choose a display that really can't be that animated. I would have loved for this to be a 3 parter, where you improve on ordinary pinball-machines and use a modern LCD/LED display and make a few short animations in full RGB color.
FatLingon the goal here was to make a small and simple portable pinball machine.
I really enjoy watching and listening to your words what come out your mouth, I just wish I understand what the hell your talking about.
Worth noting: In teensyduino, the author wrote functions called 'digitalwritefast' and 'digitalreadfast' that take only 1 cpu cycle to complete...much faster than default :D (without needing to resort to port addressing)
frollard How about using the SPI port and have half that stuff happen with no processing at all haha.
Robonza Definitely a trade between novice usability and efficiency...I just mentioned that one because ports and bitwise operations are a bit heavy for the beginner and if the other goal is speed then it's already been taken care of :)
Love episodes with more coding exploring like this one
What would be nice is to have more detailled schematics available (on Github for example). What diode did you use for the Solenoid driver. 1N4001 ?
I know that there is a low chance of you doing this. But I can't find a lot of videos explaining how to add buttons or hopefully a joystick to a teensy. After this, think you could make a video on adding a joystick and button to teensy?
Any listing is a great and can be improved with feedback over time. As a newb, part numbers and links to items I can buy on E14 are great. Since so some of this is from scrounged parts, substitutions or specs for similar parts would be helpful. I would think over time makers who give it a try will share their own links and sources for scrounged parts or alternative parts as well and it can grow organically. That's my take from someone just stepping into the pool, others who are already knee or hip deep probably don't need as much or have other preferences. I hope that helps.
VacFink Thanks for the feedback :)
Well done. You are amazing!
I'm very interested in making a similar project but have some fundamental questions. How do you turn the closing of a switch (say a stationary target on the play-field being hit by the pinball) into a digital signal that can be used to increase the score?
Also how would the same concept work but this time the ball would hit a switch which activates a solenoid (say a kicker)?
Thanks!
The Ben Heck Show I might be missing a trick - but on the score 'number' to string code, could you not just use cstr to convert the actual number to an ascii string. Then all you would need is a loop through and replace the 'val' of each -48 to get the ascii values correct. Would read a lot easier I think. Also as a quick thing, don't forget to right justify your score :) (I don't know about Arduino or Teensy code but in the old days of basic you could set the length of string you wanted to return and justify your number in it)
- just my 2p worth :)
Cheers
Wayne.
On the Mosfet, Ben called the diode a 'Fly-back' however I have learnt it as a 'Rerversed Bios'. If this just language diffrence (I am from the UK) or have I learnt it wrong?
Reversed bias.
Thomas Jarvis _A flyback diode (sometimes called a snubber diode, freewheeling diode, suppressor diode, suppression diode, clamp diode or catch diode) is a diode used to eliminate flyback, which is the sudden voltage spike seen across an inductive load when its supply voltage is suddenly reduced or removed._
Thomas Jarvis No, you learned it right. The reversed biased diode is being used in a fly-back configuration, across the coil in the relay. This is one of the many uses of a reverse-biased diode - flyback voltage spike suppression across a DC-driven inductor.
When the MOSFET switches from on to off, the magnetic field in the coil collapses, but while it does, it can generate a substantial reversed voltage spike across the coil. The diode provides a safe way to drain the energy within the coil, thus preventing you from "flying back across the room" from touching a coil that is supposedly "off". Here, it's primarily to protect the MOSFET from damage, but in higher-energy circuits, it can prevent arc events.
Falbert Forester
Ah, okay. Thanks. That makes sense now.
I have my electronics exam this week and there is always a question on Mosfets or BJTs with an electromagnetic thing, so that very useful.
Ben looks like a mix between Gaben, Bill Gates and Conan O'brien
Yes!
he doesn't just look like it, he IS it
What is the IDE you are using? I like the fact that you can expand and collapse functions. It makes the code better organized.
Antoine Coppens It's just a text editor, Notepad++
Ok thanks Ben (or Max) !
Hmm, this alphawire ad was actually not so bad... nice !
And nice intro :)
Project looks interesting, will follow that *thumsup*
Niklas Mertens Thanks!
Hey Ben I've have a pair of broken heads laying around, well they not broken I guess. They still work its just the right plastic thing broke off. I was wondering if you could fix it or even make it better some how. Please send me a message if you can.
Wow, you code wayyy more efficient than I do! And yeah at 96MHz that tniyduino is properly fast
Crikey you have to remember so much info... WOW! :D (I used to program so I get some of what you are talking about, but still Wow, so much info!)
can you do a guide on RetroPie? I'm having trouble with MAME compatibility
Loved to see all the code!!
The Gods will be displeased. Very displeased, ...... maybe end of world displeased.
You don't shrink pinball machines, you make them bigger.
Volgens mij heb je teveel gedronken
Tommie Terhoeve The Gods forbid that kind of frivolous activity.
DeRaafMedia ehm ok dan... Je weet dat dit een tech channel is je :)?
Tommie Terhoeve The Gods forbid that kind of frivolous activity.
instead of the score divider, just use a bitmask and bitshift ?
Welllll done!! Really enjoy these videos! Looking forward to the next part :) :)
Would 120fps slo mo capture the individual numbers
I wish I could do any of this stuff :(
Is there a way to connect a vibration sensor to the segment display
Great project!!!
Hello I would like to see a video in which you convert a single android tablet into a tablet gamepad as JXD and please send a mail with how make this....
How does he not run into data bottlenecking issues with so few pins? I would put everything on its own port (excluding group operations) but I guess that would make it more complicated.
I guess he has it set up to only run one function at a time.
for composing the score string, wouldn't snprintf be better? is it available?
I haven't finished watching the video yet, but I've gotten to the start of the code portion. Why are you storing the numbers as ASCII values and then subtracting 48 instead of just storing them as integer values to start with?
Hello World! The compiler will optimize away the subtraction so it's just more convenient to let it do the math like that and makes it easier to modify for the programmer.
Thumbs up. Just a quick question would you do a N64 portable?
Trevor Woodworth Ben did, some time ago, it was a pain to do: www.benheck.com/n64-portable/
Love this guy. He explains code like it makes sense. Its rules not logic which is why we arent aliens yet. haha
He's really great.
What is your background music, in the vid?
At 5:58 you said USB bus. Suggesting you don't want to power the LEDs off the universal serial bus bus.
Meep Walrus Well, y'know, with a few resistors...
Where'd you go to school?
I have an idea for a project. A customizable and versatile Raspberry Pi Game kit that can be used by noobs and has no soldering involved.
Can you do a ps4 controller charger for 4 controllers and more porable
Hallo Ben. What is your Education?
Oh btw what chip was on the audio shield??
Cannot recommend the Teensy enough. The price/performance is so far above anything else I have seen in the MCU world. PJRC also has some of the best support for software on their forums.
MOAR DREAMCAST PORTABLE!!
UNKNOWNGAM3r D: It's made already! (but thanks :)
The Ben Heck Show needs moar WiFis (for games that supported the broadband adapter)
Some of this information would've helped while I was deciphering the code for making a Virtual Pinball table of America's Most Haunted. :-P
What IDE are you using? I wish the arduino IDE would collapse functions like that.
It's notepad++ (not an ide just a text editor)
Benjamin Harvey it looks like notepad++.
Benjamin Harvey At the end of the day it's just text files, so you can use whatever you like. The IDE just packs in avr-gcc to make things simpler.
The Ben Heck Show
yeah. personally I prefer Notepad2, which is used more like the original Notepad (IOW: you open a bunch of instances in parallel, with one instance for each file).
I clocked it was notepad++ when I saw the full screen ;)
Nice intro BTW! :)
***** Thanks :)
Hey Ben I was wondering how do we contact u about building us something
Bloodthirsty9000 Thanks for asking, you need to use the 'suggest a build form' on the element14 Community, here's the link: ow.ly/NBYFa
the audio levels are all over the place in this episode..
this is a really cool one! you need to work on your code though, ben. :)
a prostitute themed pinball machine should have the Flying Spaghetti Monster in the center of the decal
love you ben
Frostclaw20
I am studying Electrical Engineering to be like you.
Frostclaw20 Excellent, if it helps, the element14 community's a good place to learn from, too.
I will register then
Ben, I enjoy your show very much - I think I just finished watching all the past episodes - but the parts where you teach programming are almost impossible to follow: there is not always a good synchronization between what you say and what is shown, there are too many lines of the program that are highlighted at the same time, and by the time the viewer has found what line you are describing, there are some comments that are added at the bottom of the screen... You are going way too fast! And I am a programmer. While the electronic part is much easier to understand, even for me with no prior knowledge of electronic (or a level way more limited than my computer knowledge).
When you said portable pinball I was looking forward to a laptop pinball machine that also plays Xbox 360 and Vectrex games...What gives Ben?!?
Cool!
is this 24 or 30 fps? this is really weird for my brain
***** about 24fps
The Ben Heck Show I noticed this too, but this is the first episode in a while that I've watched on my laptop (as opposed to my phone). Maybe eevblog's 60 fps is screwing with me...
holy hell that title sequence was loud.
Your buildings are so amazing, and i want to build them, but im only 12 Years old, and cant build your Projects... Is there any Solution (except asking Elders or Relatives for Help), that i can build your Projects?
P.S. Mostly Problems are 3D Printing, the lovely Money. Time is not the Problem
Oh forgot to mention you! The Ben Heck Show 😉
at 7:47 Poll I/O spells Pollio,lol
22:30 This is not true! bitRead, bitWrite, bitClear and bitSet are macros in wiring.h (Teensyduino) or in Arduino.h (Arduino), they are bitwise operations, that run just as fast as your functions.
For digitalWrite and digitalRead your argument is only true if you run these commands with dynamic parameters otherwise they will be single-cycle instructions.
systemmaster128 There is little correction, writing constant to SFR on ARM or Atmel is not single-cycle instructions (it is possible to be single-cycle instruction only if you have prepared values in general-purpose, which is rarely case) changing one bit on SFR usually take 3 instructions.
bitWrite is macro but it use conditional assignment to select which macro it will use (which can be determined during compilation for static parameter if you use some good compiler, GCC dont do that)
digitalWrite and digitalRead are never single-cycle instructions (they never cant be even compiled to 3 instructions), and there is no difference if you use dynamic parameters or static parameter.
who ever thought light blue writing on a whiteboard was a good idea?
Is that an evil rabbit I see?
Ricky Li With sharp pointy teeth?
+The Ben Heck Show can i earn this pinball?
Finally ;)
i'm building the minecraft pinnball
His divider was set to 10M instead of 1M like he said it was.
Oh cool :3
That intro was way too long and way too loud. Looked cool though.
i hate the I/O restriction on these robot controller boards!!!!
Yaaaaas
Do a ps4 portable pls
Second from Germany
Looks like notepad++
29 minutes of utter gobbledygook.
2 Weeks......Noooooooooooooooooooooooooooooooooooooooooo
kielerkarl www.nooooooooooooooo.com/
:) like it :)
The Ben Heck Show Hahahahaha
11th
First
first
First 😏
This code is bad on so many levels. This makes me feel sad:(
Triszka Balázs How would you improve it?
Can you upload the code somewhere? pastebin for ex.
Fools, normalize your intro, or gonna get a bill for a pair of speakers..