flyingbrick

Arduino stuff/ programing/so cheap

Recommended Posts

So I have just ordered two Arduinos and a little color OLED screen for a car related project- I am excited as fuck to learn some new skills and also achieve something for far cheaper than otherwise possible (and in a way more interesting way, too)

So @Ned and others- what have ya done/ what reading material do you think I should first start with.

 

Edit.. also, back in the day I did a course on c++ and Delphi (it was 16 years ago) so maybe that will help (I can't remember a single thing about it all)

  • Like 1

Share this post


Link to post
Share on other sites

Copy other peoples code and modify to suit.

Before you could just use a phone... I made a GPS based speedo one time. It worked, but it was too laggy. I thing the problem was the refresh rate of the gps receiver thingy.

My problem was trying to think of what to make....

  • Like 2

Share this post


Link to post
Share on other sites

Getting started:

https://www.arduino.cc/en/Guide/HomePage

https://www.arduino.cc/en/Reference/HomePage

Don't worry about the code thing yet, it's nominally c++, but modified a bit to make it easier.

Start the IDE, include the library for your thing, and off you go :)

If you have specific problems, (maybe particularly car based stuff) ask here, and we'll answer, and build up some know how.

  • Like 1

Share this post


Link to post
Share on other sites
49 minutes ago, Adoom said:

Copy other peoples code and modify to suit.

Before you could just use a phone... I made a GPS based speedo one time. It worked, but it was too laggy. I thing the problem was the refresh rate of the gps receiver thingy.

My problem was trying to think of what to make....

I haven't tried this stuff earlier for two reasons- lack of useful projects and the idea that they were too spendy and bulky to be used for permanent (set and forget) type projects. It feels foreign to me that you could have this programmable computer hidden away for the sole task of (for example without thinking too much about it) dimming your interior lamp and flashing your indicators...but then for $5 why can't it just do those things?

I basically just want mine to display dash indicator symbols; handbrake, headlights, indicators, alternator etc which should be bloody easy (hard for me but an achievable goal)

Share this post


Link to post
Share on other sites

So i thought i replied to this already, but never hit submit.

Guessing its one of those I2C LCDs? pretty sure there will be some example code for them on the interwebs somewhere for the arduino IDE. Just keep cutting and pasting example code together until it does what you want :P 

There will be some graphics libraries that can display simple images like that i'm sure. I've only recently started playing with the arduino IDE because in the old days it was just garbage and didnt do anything for me, but recently got a few WeMos D1 modules, and was insanely surprised at how easy it is to get libraries installed and example projects loaded etc. It all seems to just work and you dont need to know anything about micro controllers at all to use it. It's amazing...

 

  • Like 2

Share this post


Link to post
Share on other sites

I'd like to whip up a simple gear indication display for my pos racecar as a little project, ideally it would calculate gear selection based on  RPM signal and divide by speed signal, sure it won't display gear with clutch engaged.

Am I dreaming or is this possible? also if it could control a separate LED or two for a shift light that would be handy.

  • Like 1

Share this post


Link to post
Share on other sites

Almost anything is possible within reason.

 

I started on this project a while ago using an arduino uno. It now embedded on its own pcb and been through many revisions and still not finished haha.

<media>

</media>

 

  • Like 7

Share this post


Link to post
Share on other sites

Fuck this is exactly the discussion i was hoping for.

These are the units i have bought @Ned 

https://www.aliexpress.com/item/Free-Shipping-0-95-inch-7pin-Full-Color-65K-Color-ssd1331-OLED-Display-3-3v-5v/32646204260.html?spm=2114.13010608.0.0.f8qGLh

https://www.aliexpress.com/item/Nano-CH340-ATmega328P-MicroUSB-Compatible-for-Arduino-Nano-V3-0/32740641316.html?spm=2114.13010608.0.0.f8qGLh

I liked this board because its so compact and i wish to hard wire it in. I'm just about to purchase an arduino code simulator which should make things easier for me.

I did want a tiny screen but feel the one i bought may be a bit small.. just purchased one of these just incase:

https://www.aliexpress.com/item/New-1-8-inch-TFT-LCD-Display-Module-ST7735-128x160-51-AVR-STM32-ARM-8-16/32816228162.html?spm=2114.13010208.99999999.264.1Qun1e

It will depend on screen visability and brightness etc etc. I'm not wanting to do anything extremely flash.. i will likely separate the bigger screen into 6 quadrants each with its own symbol to display when necessary.

I was going to have them all display fullscreen on the smaller display but am not sure how to tackle multiple icons at once- it may get a bit confusing having a sequence of different icons flashing up in repetition.

 

Share this post


Link to post
Share on other sites

Following this, I'm very keen to try some arduino stuff. Its been years since I've soldered. I want to do data logging or something in my car.

Share this post


Link to post
Share on other sites

so heres a video telling you exactly what to do (first youtube result)

but see how slowly the display updates? Arduinos and 'big' screens just go slow. Updating a whole screen takes a long time, and you can noticibly see it draw the thing you wanna see. It's not terrible, but just be aware that it wont be like watching a noprmal screen pop up a symbol or anything.

still, not a bad way to go, especially when you're only updating a small section of the screen at a time

  • Like 3

Share this post


Link to post
Share on other sites

Thanks ned- yep i watched that video last night- its actually how i discovered the larger screen. I cannot wait to get my shit!

I think the main issue with TFT is that it wont be backlit (if i understand things correctly) where as my smaller oled screen will be.

Still trying to work out if i can fit 2x oled screens to one arduino. 

 

Share this post


Link to post
Share on other sites

Somewhere on the internet i saw exactly what you want... but cant find it this second, i'll keep trying.

those LCDs run on SPI and i2c, just use it in SPI mode and then you can connect as many as you can find CS lines for. So they share the MOSI and SCK pins, and have a different CS pin for each LCD. MOSI is the data line, SCK the clock and CS the chip select, or slave select. You will likely run into RAM problems before you run out of pins as they often use a RAM buffer for the whole screen, and with a decent mumber of pixels (especially in colour) that could become memory hungry

  • Like 1

Share this post


Link to post
Share on other sites

Also, the Arduino IDE is still shit, but:

1/ install the arduino IDE

2/Download / install MS visual studio community (make sure the tick the C++ option)

3/ Install Visualmicro from http://www.visualmicro.com/page/Arduino-Visual-Studio-Downloads.aspx

Now you can program in MSVC which is a MUUUUCH better IDE (autocomplete, navigation etc) but VM also includes a (crude) debugger. You can read variables from the code while it's running, without having to fuck around installing lots of

#ifdef debug 

Serial.print("\r\n Some thing happened");

#endif

junk.

 

  • Like 1

Share this post


Link to post
Share on other sites

Also, get in the habit of doing loop / dropthrough code ( Non- blocking ).

That gets helpful later when you've got lots going on.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.