Arduino Anxiety - Uno, 128x32 OLED and u8g2lib

  Рет қаралды 184,445

Julian Ilett

Julian Ilett

Күн бұрын

Пікірлер: 201
@georgekot6377
@georgekot6377 8 жыл бұрын
Hello Julian, I just felt the need to say an extra thank you for this video. I am sure the frustration you felt has been the same for everybody playing around with arduinos. It was as if I was hearing myself when I encounter a programming problem. Keep them coming :)
@suriyontm
@suriyontm 7 жыл бұрын
Thank you so much for showing me this. I bought the same thing and was never able to get it going. It was sitting in my drawer for several months. I am a big fan of yours.
@BoomBrush
@BoomBrush 8 жыл бұрын
I always love to see arduino/oled/neopixel stuff on your channel. Looking forward to more of those videos!
@leeoliver2969
@leeoliver2969 8 жыл бұрын
Learning cool British expressions from your channel like 'dodgy' and 'faffing about'
@AnimalFacts
@AnimalFacts 8 жыл бұрын
Lee Oliver Right? I want a British accent in my videos... lol
@leeoliver2969
@leeoliver2969 8 жыл бұрын
igrewold Cigarette?
@Colaglass
@Colaglass 8 жыл бұрын
Absolutely lost it at the "I have no hair left" remark... as a programmer by trade, I can definitely relate...
@TheProCactus
@TheProCactus 8 жыл бұрын
But the smooth head, i mean code makes it all worth it right ?
@TheFakeyCakeMaker
@TheFakeyCakeMaker 5 жыл бұрын
Same -not a programmer but I laughed out loud when he said it hahahaha!
@VoidHalo
@VoidHalo 6 жыл бұрын
I usually just stick a small bit of solid core wire in the female end of a dupont connector if I need to convert it to male. Breadboard jumpers work great for this. Fits nice and snug.
@highdesert50
@highdesert50 8 жыл бұрын
22 AWG solid core wire can swap for a female to female dupont in a pinch. Can completely empathize with your frustrations over the lack of immediate documentation that seems to loom all too often.
@Friendroid
@Friendroid 8 жыл бұрын
I played with this same combination last week without ever having touched an OLED. The u8g2 wiki on github has all the info on making it work. The developer also has a thread on Arduino.cc forums.
@JulianIlett
@JulianIlett 8 жыл бұрын
I should probably have read all that before blundering around trying to get this to work.
@Anvilshock
@Anvilshock 8 жыл бұрын
But that would only be half as entertaining! Plus, we get to watch what *not* to do!
@VolthausLabElectronics
@VolthausLabElectronics 7 жыл бұрын
I agree, the Arduino clone with the male/female header option is very handy. In fact I think I ordered mine after seeing you use them. Thank you Obi Wan Juliano!
@himselfe
@himselfe 8 жыл бұрын
That error has nothing to do with C because it is a C++ error (C++ != C, the difference is not trivial). Regardless, what the error means is that the class you're trying to use (U8G2_SSD1305_128X32_NONAME_F_HW_I2C) is undefined. Having looked on the Github repo for u8g2, it seems the ssd1305 classes were only added to the header file about a month ago, so I'm guessing the version of the library you have simply doesn't have them.
@MD-vs9ff
@MD-vs9ff 8 жыл бұрын
Exactly. If you tried to declare a variable like asdfg xyz; You would get the error "asdfg does not name a type". It's expecting a type there (like int or some class name), but the name you put there is not the name of an existing type.
@burnermaster5375
@burnermaster5375 3 жыл бұрын
"What does it want!?", Is exactly me when working on OLED. They're my arch nemesis. Great video.
@therealmeisl5609
@therealmeisl5609 8 жыл бұрын
1:43 what a neat mnemonic! So D = 4th letter - yellow means 4. And hey, C = 3rd letter - orange means 3. That fits nicely.
@wasanthawimaladharm
@wasanthawimaladharm 4 жыл бұрын
I want screen upside down fonts in 0.91 OLED display (90 DEGREE FLIP) HOW CAN I DO THAT
@Brutaltronics
@Brutaltronics 8 жыл бұрын
i don't always not name a type, but when i do, i get compile errors.
@JulianIlett
@JulianIlett 8 жыл бұрын
Join the club!
@KennethScharf
@KennethScharf 8 жыл бұрын
The "does not name a type" would indicate something was missing or not right in the ".h" file that describes the available constructor choices. Did you look at that file?
@TheDutyPaid
@TheDutyPaid 8 жыл бұрын
I like Arduino projects.
@JulianIlett
@JulianIlett 8 жыл бұрын
and 'other programming content'. Cheers ;)
@tomallen7299
@tomallen7299 6 жыл бұрын
I love this, I too share your pain with coding. Great video though, thanks for sharing it as one of these displays has just landed on my desk. You have done all the head banging against a brick wall for me!
@radovanrakovicky2655
@radovanrakovicky2655 5 жыл бұрын
Hi guys. Is possible to connect 3 displays to one Arduino board and each of these displays will show different text? Is possible to address each display somehow? Thank you very much!
@codebeat4192
@codebeat4192 7 жыл бұрын
It's not C, that cause the problem, it is the u8g2lib. It is an awful library, it want's to be compatible with every display (and therefore very confusing) and because of that is pretty slow. Animations? Don't go with u8g. Try OLED_I2C for example, must faster and not bulky at all (if it is the chip is compatible). "Does not name a type" is a result of all the defines included in the u8g lib, if you define a display that doesn't match a define and/or compile conditions, the class will not be defined and therefore results in "Does not name a type" error. Again, it is not a C problem, it is an library implementation problem. The developer is able to let you know when you 'define' an unknown or impossible display type with a custom compiler error but did not implement this. Blame u8g, not C.
@deangreenhough3479
@deangreenhough3479 8 жыл бұрын
Thanks for sharing, tend to learn a lot just by following your train of thought👍👍
@stevesm2010
@stevesm2010 8 жыл бұрын
Like you Julian, I find C++ very frustrating. If I can't find a code snippet, it takes me ages to sort issues out. You're not alone!
@JulianIlett
@JulianIlett 8 жыл бұрын
Thanks Steve :)
@oreubens
@oreubens 8 жыл бұрын
a 'type' in C and C++ is any sort of 'thing' that you can make (one or more) variables of. so int, float, double, long are all examples of types. In fact they're special kind of types in that they're so called 'built-in types', they're part of the C/C++ language definition. Now what is nice about C/C++ is that they allow you to define your own types which is a pretty fundamental concept in C++. Typically this means you combine a number of those built-in types into a class or struct give that collection of types a name, and you've made yourself a custom type. That U8_something_something_noname_something is an example of such a custom type, and you create (construct) a named variable (u8g2) of that type, or rather, you're trying to. The error you're getting is the compiler telling you it sees you're trying to write something that looks like defining a variable (u8g2) of a certain type (U8_something_something_noname_something), but that it hasn't seen a declaration yet of that name as a type. As you already found out now, the reason why it didn't find a declaration is that you were using an outdated version of the library that did not yet declare that name as a type. --- What makes C++ particularly interesting is that you can create your own types, and then perform operations on those types just like the built in types. So you could make a type named 'complex' consisting of a real and an imaginary part, define how all the operations on a complex type work, then write code like: complex x(1.5, 2) // define x as 1.5 + 2i complex y; // define y, no value (yet) y = (x*x) + x; assuming you've defined and implemented * and + operators, this'll work. this makes working with custom types a lot easier and more 'natural' than languages that don't have this ability. But yes. if you're not used to object oriented programming then this whole concept of custom types looks 'weird' and 'strange', and it really requires you to think about programming in a different way than you would compared to programming in a imperative language like assembler, basic, pascal, c, cobol ... (though basic, pascal and cobol now too have object oriented versions)
@buildthis2324
@buildthis2324 3 жыл бұрын
"long winded explanations..." "I can't read all that!" You're not alone man. "In a nut shell" is bliss.
@RogerKeulen
@RogerKeulen 8 жыл бұрын
Your "compiler" expects the first thing he sees to be a type. Like: uint8_t So, you have to include a header file where U8G2_SSD1305_.... is declared. It's the type of your object.
@matthewdornfeld2126
@matthewdornfeld2126 6 жыл бұрын
In Arduino 1.8.5 I don't see an option to download the u8g2 library. How can I manually import it?
@ycmgxekwa
@ycmgxekwa 7 жыл бұрын
Hi Julian and Others I get this error with the nokia 5110 lcd on u8g2 library: HelloWorld:52: error: 'U8G2_PCD8544_84X48_F_4W_HW_SPI' does not name a type Any assistance will be much appreciated. Thank you.
@grahamevans5304
@grahamevans5304 5 жыл бұрын
coming at this for the first time, i didnt get the "does not name a type" problem but got instead a "u8g2lib.h no such file or directory" then tried to run other examples from the full buffer list as well as the Hello World one and got ( Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Uno" C:\Users\Graham\Documents\Arduino\libraries\U8g2\examples\full_buffer\HelloWorld\HelloWorld.ino: In function 'void setup()': HelloWorld:260:3: error: 'u8g2' was not declared in this scope.) note to self: go learn librarries properly. any guidance much appreciated.
@aboudisyrian
@aboudisyrian 7 жыл бұрын
Hi I want use this oled to display temperature by sensor DS18B20 Please show how i can do it
@ET2carbon
@ET2carbon 4 жыл бұрын
I want to put like 32+ of these together (2 groups of 16) mounted in a long consecutive horizontal pattern to display the individual names of audio track channels on my 32 channel audio mixing console which is commonly called a scribble strip. I want that along the bottom of the mixer. On the top of the mixer's audio meter bridge, I want to add color displays above each channels dB meter that display each channels spectrum analysis. Please help me with some ideas how to start. I need either one interface to control each thing, or several really small controllers I can install inside the mixer with being to obtrusive. I thank you in advance. These additions to my console would increase it's value and make it have similar features to a high end console.
@MrSasha3050
@MrSasha3050 7 жыл бұрын
What is the size of the active area this display? In millimeters please
@arduinomasterrobertmoller2904
@arduinomasterrobertmoller2904 8 жыл бұрын
Thanks, helped me a lot to get started on Oled.
@mrroobarb
@mrroobarb 6 жыл бұрын
A bit late to the party but I always use orange for SCL, because a clock works on orange... sigh ;-)
@webchimp
@webchimp 8 жыл бұрын
Just finished getting mine running before seeing this video was up. This is the constructor I settled on, was alreadin in the list U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); I also only found the SDA/SCL pins for the first tiome today, hadn't seen them because they were labled on the back, been using A4 & A5.
@chorazytorpeda16
@chorazytorpeda16 6 жыл бұрын
Hey, i wonder if you could try to strip bg from this oled display to make it transparent.
@ilaserbia
@ilaserbia 8 жыл бұрын
Couldn't you have just opened the header file and see what the proper constructor was?
@yukimizake
@yukimizake 8 жыл бұрын
Video length: 13:37, nice! :D
@JulianIlett
@JulianIlett 8 жыл бұрын
Ileet - pretty common misspelling ;)
@TimurIskhodzhanov
@TimurIskhodzhanov 8 жыл бұрын
The problem with unclear error messages is because of bad compilers, not bad language. If only they used Clang as the compiler in the Arduino toolchain...
@tengelgeer
@tengelgeer 8 жыл бұрын
No problems with 1.8.1 and u8g2 :) And two things that got me as well: 1) The Wiki with constructors forgets to name a variable. Because of the long constructor/typedef and the fact the default in the examples is u8g2 as variable name I missed it... 2) And more of a Arduino thing, in library manager, you ONLY see the update button after selecting the library :/ Dohhhhhh
@bertoid
@bertoid 8 жыл бұрын
For your female headers:- Try getting some of those male headers with the extra length pins, and force the spacer down to half way along the pins. Should then fit nicely into the F-headers, with enough pin exposed for the F-duponts to fit nicely as well.
@bertoid
@bertoid 8 жыл бұрын
PS: use a vice to shift the spacer...
@SuperLoops
@SuperLoops 8 жыл бұрын
this is me every time I try to make my arduino do anything without just following instructions. but I had an idea to make a speed meter for my hamsters wheel with a little display to show how fast hes going and how far hes run and Im determined I will make it work
@JulianIlett
@JulianIlett 8 жыл бұрын
Hall effect sensor on the wheel - but do you measure the number of rotations per unit time, or measure the time per rotation? Decisions decisions :)
@SuperLoops
@SuperLoops 8 жыл бұрын
Im glad you said that because someone else said I should use a reed switch but I looked at some other peoples projects and both things on ebay and decided a hall sensor thing would be best and thats what I ordered
@reeseyme9613
@reeseyme9613 8 жыл бұрын
name a type? sounds like the "type" that you call for is either being comment out or simply missing in the header file of that library.
@MobiusHorizons
@MobiusHorizons 8 жыл бұрын
so I've run in to the same problem before. basically `does not name a type` means `the thing you typed doesn't exist`. You can think of it like as if you had typed `flo4t a = 0.00`. You would get an error saying that `flo4t` does not name at type, because there is no such type. What the line `U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(...)` does is creating a new C++ object called `u8g2` of the type `U8G2_SSD1306_128X64_NONAME_1_HW_I2C`. Basically the error means that the library doesn't provide a constructor for the 128x32 OLED using hardware I2C. The error is definitely confusing, but I hope that helps.
@JulianIlett
@JulianIlett 8 жыл бұрын
Yep, it helps. I now know the problem is because I had an old version of the library installed. Doh :s
@MobiusHorizons
@MobiusHorizons 8 жыл бұрын
Oh really, i'll have to update mine as well.
@peterthinks
@peterthinks 7 жыл бұрын
Can you make this scroll through an ebook?
@rimmersbryggeri
@rimmersbryggeri 5 жыл бұрын
Was t becasue you picket 1305 when it should have been 1306?
@williamsquires3070
@williamsquires3070 8 жыл бұрын
It's probably saying that it doesn't know what to make of that line; if it's a constructor, or even an initializer call for a model, it should probably go in the setup() function. Where you have it, according to ANSI C, is a function prototype, but you've provided no implementation. Furthermore, the part in parentheses, "U8G2_R0", is incomplete; if this is the argument name, then it needs a data type, like int, char, void *, etc... (i.e. "UInt8 U8G2_R0" would tell the compiler that the argument name U8G2_R0 is a type of 8-bit, unsigned integer.)
@learnelectronics
@learnelectronics 8 жыл бұрын
I feel your pain. C has frustrated me for over 20 years. why can't I just write code in Pascal?
@GigAHerZ64
@GigAHerZ64 8 жыл бұрын
Because it's even worse?
@AnimalFacts
@AnimalFacts 8 жыл бұрын
learnelectronics I suppose you could port a cross-compiler for Free Pascal. Would be interesting.
@webchimp
@webchimp 8 жыл бұрын
Ah Pascal, happy memories of college. Fist proper programming experience, Apple][e then Turbo Pascal 1.0 on the classes only 386 PC (so much faster at compiling).
@mbirth
@mbirth 8 жыл бұрын
That's why I prefer MicroPython boards.
@fredlllll
@fredlllll 8 жыл бұрын
doesnt name a type=> arduino cant find the class in the library. just see if you can find where the classes are. then you can probably figure out whats wrong
@EdwinFairchild
@EdwinFairchild 7 жыл бұрын
if only arduino ide could have features of a real ide where you can right click and see where things are defined that would have helped a lot
@DonDegidio
@DonDegidio 8 жыл бұрын
Julian, At 10:06 when you show the Library Manager ug8lib does not list the SSD1305 as a supported display controller. Might that be causing the problem?
@JulianIlett
@JulianIlett 8 жыл бұрын
Yeah, maybe the library manager is giving me a false sense of security. I should maybe re-install the u8g2 library.
@Tetramorium
@Tetramorium 8 жыл бұрын
I just used the Adafruit library for mine. Any reason to use this method over that library?
@JulianIlett
@JulianIlett 8 жыл бұрын
u8g2 supports a large selection of LCDs and OLEDs and a couple of e-ink displays. ucglib supports colour OLEDs too.
@testchannel1834
@testchannel1834 5 жыл бұрын
Julian can you connect the display to your raspberry pi . I want to know if it works on a Pi zero
@boblewis5558
@boblewis5558 6 жыл бұрын
Just in case anyone else has this problem be aware it can easily be a strict coding issue - my exact same problem was. Always a danger when altering someone else's code I miscounted curly braces!! That's all but it kept throwing up the exact same "type" error all over the place! Just make sure ALL your syntax is absolutely correct. Why a compiler of any worth can't do a simple check for matching braces I don't know. It can still happen but both the editor and the compiler do not make it easy to spot these kinds of stupid errors. That is a partial failing of the IDE, a partial failing of the compiler and a failure of the coder. A coder should be EXPECTED to fail however and the relevant tools SHOULD make ir easier to resolve. A few people on this thread have already said the u8g2lib is a mess and I agree, and as an example you have to modify the LIBRARY EXPLICITLY JUST to handle 16 bit mode in order to handle line sizes of over 255 (it says 256!!)!! This should simply be a parameter passed during setup. NO-ONE, least of all a beginner should expect to have to hand edit an existing library - it pretty much defeats the object of the exercise! BTW u8glib is now defunct, deprecated and no longer being developed - it has been replaced with u8g2lib - refer to Github documentation.
@SunilPatel-dx6yj
@SunilPatel-dx6yj 8 жыл бұрын
hii Julian I like your o led project can i connect The my smart phones Display with arduino
@jmunsamy
@jmunsamy 8 жыл бұрын
Hi julian would love to see some vids for e-ink displays. thanks
@JulianIlett
@JulianIlett 8 жыл бұрын
Funny you should say that ;)
@jimsmindonline
@jimsmindonline 8 жыл бұрын
You could just use a male pin header, I found myself yelling! I've got a couple of the slightly larger oleds on their way, not touched oled before so thanks for the intro. :)
@MadnessJoe
@MadnessJoe 8 жыл бұрын
Why not use Adafruit SSD1306 library ???
@christianshepherd4771
@christianshepherd4771 8 жыл бұрын
MadnessJoe , i've been using that library for those displays too for some projects of mine. it gives you 4 lines of text.
@christianshepherd4771
@christianshepherd4771 8 жыл бұрын
MadnessJoe , i've been using that library for those displays too for some projects of mine. it gives you 4 lines of text.
@Ucceah
@Ucceah 8 жыл бұрын
good video. including some of your own learning process can be very hlpful for others. just one thing: get a breadboard! you wont regret it, even if you dont need it very often.
@marcosmoraes1980
@marcosmoraes1980 4 жыл бұрын
Great video. Did you try to run the display without the library?
@niclas.lindstrom
@niclas.lindstrom 5 жыл бұрын
I don't know if it makes sense to comment this video after 2 years and you probably already found this out. But the reason for your misformed fonts are not due to the NONAME type but your typo in the resolution. Look at around 9:20 in your video and you can see that you typed SSD1306_128X64_NONAME and not SSD1306_128X32_NONAME so because of that every other pixel line was missing...
@JulianIlett
@JulianIlett 5 жыл бұрын
Thanks Niclas. I think I spotted that in a follow up video, but it's difficult to remember :)
@SpeccyMan
@SpeccyMan 8 жыл бұрын
The problem isn't the elegant simplicity of C, it is the totally inelegant (and unnecessary) complexity of C++. Can you guess which one I like and which one I dislike? ;-)
@ThatGuy-nv2wo
@ThatGuy-nv2wo 8 жыл бұрын
Someone sounds like they don't realise how simplistic C++ is to use ;)
@JulianIlett
@JulianIlett 8 жыл бұрын
Ha ha, yes I can guess :)
@SpeccyMan
@SpeccyMan 8 жыл бұрын
If it were simple I would use it!
@ThatGuy-nv2wo
@ThatGuy-nv2wo 8 жыл бұрын
Nick B It is simple!
@dand370
@dand370 7 жыл бұрын
Can you change the I2C address ?
@kardeef33317
@kardeef33317 8 жыл бұрын
When it asks for a type it means that some variable isn't declared.. I.E. int,long.float.double char or struct.. Somewhere buried in the library usually.
@JulianIlett
@JulianIlett 8 жыл бұрын
So it seems the 128x32_NONAME constructors aren't properly implemented :/
@ThatGuy-nv2wo
@ThatGuy-nv2wo 8 жыл бұрын
Julian, how can they be? That begins with a number, that's not legal!
@JulianIlett
@JulianIlett 8 жыл бұрын
The full name is U8G2_SSD1305_128X32_NONAME_F_HW_I2C, I was abbreviating it :)
@SpeccyMan
@SpeccyMan 8 жыл бұрын
Yes indeed, the bloat of C++ even extends to naming, hehe!
@ThatGuy-nv2wo
@ThatGuy-nv2wo 8 жыл бұрын
Nick B That's user defined ;-;
@Jeff121456
@Jeff121456 8 жыл бұрын
Some C developers get over enthusiastic about macros because they are resolved by the compiler.
@tobyverwey7829
@tobyverwey7829 8 жыл бұрын
4?
@mossy1259
@mossy1259 8 жыл бұрын
Please can you do a vid on transistors and how to flash an led? Love your videos! Thanks, Dai
@JulianIlett
@JulianIlett 8 жыл бұрын
How about this one: kzbin.info/www/bejne/l3aoi6mkjLGNqLc
@mossy1259
@mossy1259 8 жыл бұрын
Julian Ilett Thanks, but I was wondering how the single Led transistor set up worked, not the multivibrator. Cheers
@JulianIlett
@JulianIlett 8 жыл бұрын
Have an LED one side and a resistor on the other.
@mossy1259
@mossy1259 8 жыл бұрын
Julian Ilett Thanks!
@aaro1268
@aaro1268 8 жыл бұрын
Long story short, your compiler doesn't recognize the object. e.g `inty var = 0;` is wrong. `int var = 0;` is correct. I would presume that the library doesn't support the OLED controller, so you'll probably have to write your own type or library. Consult your datasheets for the controller chips and you'll need to write your own type. Looks like you found a type that is similar to what you need. You may need to modify the library's code slightly if you bump into a bug, but it seems to be compatible.
@pow9606
@pow9606 4 жыл бұрын
An example of a type is char, int, double etc. In C a struct is also a type. In C++ a struct or class is a type. To create an object (instance of struct or class) you call a constructor. If you have a class called car an you want to create a Car and name it Bmw. :- Car Bmw; Car is the type. Bmw is the name given to the object when you use it in code. Eg. Bmw.Brake(); If the Car class has a constructor that requires a parameter. Create an instance like: - Car Bmw(unlockDoor); where unlockDoor is a parameter you pass to it. so that huge long name is a type.
@tubical71
@tubical71 8 жыл бұрын
"does not name a type" roughly means that your expression has no "reference" in the library....or more easy: it does not exist in the library...
@softwork406
@softwork406 2 жыл бұрын
Awesome tutorial. Thanks
@duncanx99
@duncanx99 6 жыл бұрын
"does not name a type" - we've all been there... It's a brave man who does the inevitable rant in public...
@76Raby
@76Raby 4 жыл бұрын
At least I was ...
@user-hi8jf1hu4p
@user-hi8jf1hu4p 7 жыл бұрын
Lol look at these guys all ragging on C/C++ when the problem didn't have anything to do with the language itself...
@rjmunt
@rjmunt 8 жыл бұрын
Arduino IDE's Library manager is frequently out of date Julian (verging on useless IMO). Check your U8g2lib.h against this github.com/olikraus/u8g2/blob/master/cppsrc/U8g2lib.h#L423 2.5.2 seems like a very old version as the changlelog says it's currently at v2.14 github.com/olikraus/u8g2/blob/master/ChangeLog I think this is the 2.5.2 version github.com/olikraus/u8g2/blob/b4db8002ecaa30db99d1486c99c55db97c26f969/cppsrc/U8g2lib.h and it doesn't have the class that you are expecting. I use PlatformIO for my library management. It's often much more up to date than the Arduino IDE's. PlatformIO also has the option of installing a more functional IDE along with its command line tools if that sort of thing tickles your fancy. *// Code From New Version you wanted to use.* class U8G2_SSD1305_128X32_NONAME_F_HW_I2C : public U8G2 { public: U8G2_SSD1305_128X32_NONAME_F_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE, uint8_t clock = U8X8_PIN_NONE, uint8_t data = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1305_i2c_128x32_noname_f(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); u8x8_SetPin_HW_I2C(getU8x8(), reset, clock, data); } }; *// Code from old version you ended up using* class U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C : public U8G2 { public: U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C(const u8g2_cb_t *rotation, uint8_t reset = U8X8_PIN_NONE) : U8G2() { u8g2_Setup_ssd1306_i2c_128x32_univision_f(&u8g2, rotation, u8x8_byte_arduino_hw_i2c, u8x8_gpio_and_delay_arduino); u8x8_SetPin_HW_I2C(getU8x8(), reset); } }; P.S. Long time subscriber. Love the channel sir, keep up the good work.
@JulianIlett
@JulianIlett 8 жыл бұрын
Oh, my bad. You have to click the 'more info' link to see whether the library is up to date. Mine were not up to date. Thanks for that.
@slap_my_hand
@slap_my_hand 8 жыл бұрын
Will you do another Z80 video?
@JulianIlett
@JulianIlett 8 жыл бұрын
Yes, I have an idea for that ;)
@iceberg789
@iceberg789 8 жыл бұрын
make your own 4x current sensor using a lm324, icl7660, 4x shunt & 8x resistance pair in differential amp configuration. it wont be VERY accurate, but good enough.
@JulianIlett
@JulianIlett 8 жыл бұрын
I've got the ICL7660 ammeter kit on my desk :)
@iceberg789
@iceberg789 8 жыл бұрын
cool ! build it please ! :)
@AmedeoArch
@AmedeoArch 8 жыл бұрын
Does not name a type means C doesn't recognize the variabile type cos it's not defined in the library. When you write SOMETHING u8g2(...) you are declaring the variable u8g2 which is of type SOMETHING... that's the reason for that error ;)
@JulianIlett
@JulianIlett 8 жыл бұрын
That must mean that some of the listed constructors aren't actually in the library. That's where I came unstuck.
@AmedeoArch
@AmedeoArch 8 жыл бұрын
Julian Ilett That appears to be the case, if you send me where that constructor is listed I can look into the library code and submit a fix to the maintainer so that it won't happen in the future
@JulianIlett
@JulianIlett 8 жыл бұрын
No need to submit anything now, it was my mistake - update video coming soon.
@AbdulAbulbulAmir
@AbdulAbulbulAmir 6 жыл бұрын
A lot of the time when I'm pulling my hair out, there's a good set of videos made by a guy called Julian Illet. He's stopped me going bald loads of times.
@iamdarkyoshi
@iamdarkyoshi 8 жыл бұрын
"I have no hair left." 9:39
@gravelydon7072
@gravelydon7072 6 жыл бұрын
Just think about what programming was like back in the days of key punch machines and card readers. I know, my age is telling because I learned programming before there was an IBM PC. Hair left while in college as a computer lab assistant.
@Brainstorm4300
@Brainstorm4300 8 жыл бұрын
Is this even proper C? It seems like object oriented C. That's what I don't like about arduino libraries. They often use higher level languages along with normal C. But writing a library on your own takes ages and you start losing hair at an alarming rate.
@JulianIlett
@JulianIlett 8 жыл бұрын
Yeah, Arduino uses a mashup of C and C++
@opiniondiscarded6650
@opiniondiscarded6650 8 жыл бұрын
holy shit, it has serifs!
@JulianIlett
@JulianIlett 8 жыл бұрын
Yeah, the font selection in u8glib and u8g2lib is awesome :)
@obviouslytwo4u
@obviouslytwo4u 8 жыл бұрын
Hello . big Clive mate here I like you're videos my brother
@abvmoose87
@abvmoose87 4 жыл бұрын
Good job!
@biggrey54
@biggrey54 8 жыл бұрын
when is the next PIC Assembly Language Tutorials: please
@JulianIlett
@JulianIlett 8 жыл бұрын
Very soon - I have all the parts for that now :)
@colinpamplin9976
@colinpamplin9976 8 жыл бұрын
I have all the parts too and suitably modded :) Lets go!
@gwesco
@gwesco 8 жыл бұрын
Why didn't you just plug a male/male header into the Arduino then just plug your female Dupont jumpers onto that? :-)
@CornishMiner
@CornishMiner 8 жыл бұрын
All variables/objects must be declared in C. That 128x32_NONAME constructor had not been declared in the library.
@JulianIlett
@JulianIlett 8 жыл бұрын
That's a trap for the unwary then, and I got caught in it :/
@maicod
@maicod 8 жыл бұрын
Fortunately not a greenish OLED again huh
@azyfloof
@azyfloof 8 жыл бұрын
Oh Jules :( I feel you buddy! Glad you got it sorted anyway! :O
@roberteliassen5020
@roberteliassen5020 8 жыл бұрын
I love your stuff, Julian. And of course I'm a subscriber. Now, I have coded in C and C++ since the dawn of time, long before the war (Gulf war that is), and it was hard not to comment half way through the video. I've promised myself not to do that. Anyway... The error you got means there is no type defined. Like if you tried Julian_Ilett_type u8g2(); would give a similar error because "Julian_Ilett_type" is unknown, it doesn't name a type. int i = 0; // int is a type and, so you can say 'int' names a type. The big question is why you got that compile error. My best guess is that you have an old version of the library. If you look at github.com/olikraus/u8g2/blob/master/cppsrc/U8g2lib.h you find the definition at line 387. github.com/olikraus/u8g2/blob/master/cppsrc/U8g2lib.h#L387 So. class U8G2_SSD1305_128X32_NONAME_1_HW_I2C : public U8G2 does in fact name a type. The type is a class, and the name is U8G2_SSD1305_128X32_NONAME_1_HW_I2C. It's a public class and it derives from the class U8G2 (which is kind of a root class I guess).
@JulianIlett
@JulianIlett 8 жыл бұрын
Thanks Robert - spot on. I was using an old version of the library. Just uploaded an update video. Cheers :)
@roberteliassen5020
@roberteliassen5020 8 жыл бұрын
Yes, just finished that video. With a great deal of pride, I have to add. :-D
@GordieGii
@GordieGii 8 жыл бұрын
I use extra-long header pins to plug female jumpers into female headers.
@daveb5041
@daveb5041 7 жыл бұрын
What happens after 8:00 getting drunk, 8:00 being 8:00AM? After 8:00 in america we go to work.
@gravelydon7072
@gravelydon7072 6 жыл бұрын
Tea time! :-D
@DAVIDGREGORYKERR
@DAVIDGREGORYKERR 8 жыл бұрын
I thought C++ programs started with int main(int argc, char argv[],char env[]) which can call your init(void) function and then the loop construct can be built up inside the int main(int argc,char argv[], char env[]). i.e. #include #include #include int main(int argc,char argv[],char env[]) { do { printf("HELLO WORLD "); }while(getch()!=32); exit(0); }
@ovalwingnut
@ovalwingnut 5 жыл бұрын
COoL little display with a Good Guy price. Thanks for EXPOSING your sexy thang 👍😁. Cheers! 🇺🇸
@anupbhgowda3823
@anupbhgowda3823 7 жыл бұрын
Plz send the code
@ultan04
@ultan04 7 жыл бұрын
B R E A D B O A R D . U S E A D A M N B R E A D B O A R D
@ZEROSTATIC72
@ZEROSTATIC72 8 жыл бұрын
Time for a lie down after all that faffing about? Thanks for the videos. :-)
@JulianIlett
@JulianIlett 8 жыл бұрын
Good idea :)
@johnbouttell5827
@johnbouttell5827 8 жыл бұрын
Well dodgy. Life's too short to read developer threads. I loved all the blundering and faffing about.
@mattmoreira210
@mattmoreira210 8 жыл бұрын
"Does not name a type" is an error every beginner programmer encounters at least a dozen times during his/her life. If you don't know why you're getting such a basic error, and are already *banging your head ferociously against the keyboard*, take a break. Go grab a cup of coffee and study. _What is C_? _What makes C++ different from C_? _C++ is object-oriented. What does that mean_? _What are pointers_? _What are object declarations_? Once you've studied all that, go back and try to solve the issues with your code. You probably meant to define a macro at the beginning of your code, but I won't tell you what was wrong with your implementation. Go search what is a preprocessor macro!
@boblewis5558
@boblewis5558 6 жыл бұрын
Oh dear! Did you have a late night Julian? I know you have plenty of male header pin strips ... I've seen you use them. Next time just plug a bit of strip into the female headers and voila! Instant male headers. Bit more caffeine needed methinks! 😎😁
@paranoiia8
@paranoiia8 8 жыл бұрын
Damn that's good that we don't have transgender connectors, just male and female. Imagine chaos it would make if we would have all that imaginary genders...
@Djhg2000
@Djhg2000 8 жыл бұрын
"Apache attack helicopter pin" does have a nice ring to it though.
@seanocansey2956
@seanocansey2956 8 жыл бұрын
Akinaro 😂😂😂
@RobinCernyMitSuffix
@RobinCernyMitSuffix 8 жыл бұрын
There are hermaphrodite Connectors, like the SAE Connector ;)
@theculture9768
@theculture9768 6 жыл бұрын
fascist
@Durrdalus
@Durrdalus 8 жыл бұрын
You can never have too many jumpers (fleabay 182047669137)
@RobertAlbert
@RobertAlbert 8 жыл бұрын
Now make it scroll so "World" can be read.
@JulianIlett
@JulianIlett 8 жыл бұрын
That's probably quite easy, but I'll be displaying a numerical value to show Amps measured by the INA219.
@Hasitier
@Hasitier 8 жыл бұрын
Robert Albert those ina chips (there are many of them with different specs) are great. Looking forward to see your project going on
@JulianIlett
@JulianIlett 8 жыл бұрын
Thanks Michael - my main concern is the rather high 100 milliohms shunt resistance. We'll see...
@iceberg789
@iceberg789 8 жыл бұрын
it's easy, clear the screen, write stuff, clear screen, write stuff at horizontal pos +1, clr, +1, clr,+1 ..... and round it up at the end.
@Hasitier
@Hasitier 8 жыл бұрын
You can change the shunt. There are also holes on those eBay INA219 standard modules where a wired resistor could be soldered in. But lowering the value also lowers the max current because this INA219 only can measure up to 320mV between the resistor Terminals I believe. If you can live with max 1,6 A than you could easily use 2 of the resistors in parallel. The gain of the internal amplifier can also be changed but this only helps to get better resolution and therefore lowering the max current. All of course relative to the used shunt resistor.
OLED display and Arduino
13:59
Home Made
Рет қаралды 95 М.
STM32 + OLED = Display Anything
18:01
Nick Electronics
Рет қаралды 26 М.
ВЛОГ ДИАНА В ТУРЦИИ
1:31:22
Lady Diana VLOG
Рет қаралды 1,2 МЛН
Photolithography on Silicon with PCB Chemicals
25:31
ProjectsInFlight
Рет қаралды 62 М.
Tutorial on I2C OLED Display with Arduino/NodeMCU
16:47
Crazy Couple DIY
Рет қаралды 302 М.
My Top 5 Arduino Displays
4:59
InterlinkKnight
Рет қаралды 226 М.
The best low power display? E-Paper Tutorial
9:50
GreatScott!
Рет қаралды 777 М.
15 Minute Arduino Project: OLED Ammeter INA219
14:05
Julian Ilett
Рет қаралды 281 М.