author

BADFEED

1
Inbox View Profile
1Instructables20,785Views13Comments

Tell us about yourself!

Achievements

10K+ Views Earned a bronze medal
  • Tetris Clone With OLED SSD1306(I2C) for Arduino Nano / Uno

    Hi beans,I really wish I had never used the analogue key pad for this project, I was trying to keep things simple but it has caused so many issues.I think the values from the analogue key pad are different because of the different supply voltage - when supplying the Nano with an external voltage the values returned from the AD converter will be different (I think)There is a example sketch called AnalogInOutSerial in examples, try your key pad with that and record the values you get for each key press, then change the processKeys() accordingly:for example the code for key right is below:else if ((analogKey < 510) && (analogKey > 500)) { Debounce++; if (Debounce > 10) { if (processKey) { uiKeyCode = KEY_RIGHT; //key will be processed immediately …

    see more »

    Hi beans,I really wish I had never used the analogue key pad for this project, I was trying to keep things simple but it has caused so many issues.I think the values from the analogue key pad are different because of the different supply voltage - when supplying the Nano with an external voltage the values returned from the AD converter will be different (I think)There is a example sketch called AnalogInOutSerial in examples, try your key pad with that and record the values you get for each key press, then change the processKeys() accordingly:for example the code for key right is below:else if ((analogKey < 510) && (analogKey > 500)) { Debounce++; if (Debounce > 10) { if (processKey) { uiKeyCode = KEY_RIGHT; //key will be processed immediately key.right = millis(); } if (millis() < key.right + leftRight) processKey = false; else { processKey = true; acceleration = acceleration + 70; if (acceleration > leftRight) acceleration = leftRight; } } }change the 510 and 500 to be withing a range of the values that you recorded.Sorry I can't be of more help.I want to revisit this project and use proper assigned pins for each input, also lots more things.PS. on git hub there is code for this although the acceleration is not addressed correctly I think. I really need to revisit this project :)Good luck!

    View Instructable »
  • Tetris Clone With OLED SSD1306(I2C) for Arduino Nano / Uno

    Emm. Could you try the TinyTetris.ino linked in this instructable and let me know how it goes?Its about as simple as it gets and might rule out issues with the graphics on git hub.I'm not sure what the issue could be..I don't think you will be able to port to the U8G2 library as Tiny Tetris uses low level commands sent directly to the SSD1306 to achieve the speed.What kind of micro controller are you using and do you have one of the smaller OLED -SSD1306- screens to try?Ill keep thinking about it..

    View Instructable »
  • Tetris Clone With OLED SSD1306(I2C) for Arduino Nano / Uno

    Hello,I had a quick look at the datasheet for the SSD1309 and the only real difference I can find to the SSD1306 is driving current -this would make sense as your display is bigger.So I think all should work as is.Remember to check out Git Hub, it has a lot of extras including a different key pad configuration.I really want to revisit this project at some stage, there are a lot of improvements that can be made.Best of luck!

    View Instructable »
  • Hi,In the Arduino IDE if you go to file -examples - analog - analoginSerialout Upload the sketch to your board and start the serial monitor - press the various buttons on your pad and make sure the values change.If all is good make a note of the values for each button.In the processKeys() function of the Tetris code you can set the limits for each key:else if (analogKey < 510) && (analogKey > 500)) { .......uiKeyCode = KEY_RIGHT;so if your right key value is 300 you would change values above from 510 and 500 to something like 310 and 290Hope this explains and it works out for you.best regards,

    View Instructable »
  • Hi Owen,is it one of these types?https://www.dzduino.store/module-daffichage-oled-0...I have never used one but according the the instruction in the above link its possible to put it into I2C mode although some soldering is required, not sure if you can do that?After that I would imagine it would work.I keep meaning to get an SPI version of the screen and make the code changes for that type, as long as the screen is based on the SSD1306 it should work fine.Let me know if you reconfigure your board and get it working.Best of luck!

    View Instructable »
  • Hi,I don't have a SPI version of the display, I think it would be a small change in the code though.Ill order some and experiment but honesty it could be some time, might be quicker ordering a I2C version of the display yourself.

    View Instructable »
  • Hi,I don’t think I can help you I’m afraid.I had a quick look over the SH1106 data sheet and from what I can see it’s not compatible with the SSD1306.There is no Arduino display library used for the Tetris game, it talks directly to the display, this was done for speed so unless the SH1106 has the exact same command set it won’t work as far as I know.For instance, Tetris uses the vertical addressing mode on the SSD1306 to quickly draw the blocks, I don’t see any reference to addressing modes in SH1106 data sheet.Note: I have not studied the SH1106 data sheet very well so I could be wrong, please let me know if you have any info on this.

    View Instructable »
  • Hi,you don't need the joystick plugged in for it to work.I have never tried it on a Mega but it should work.Have you tried other display library's with the 1306 on the Mega?I assume the 1306 you have is I2C interface?regards,

    View Instructable »
  • Hi,I don't know anything about that display and I imagine the system for comunicating with it is different to the SSD1306.Sorry I can be of more help.good luck with it though, nice looking display..

    View Instructable »
  • Cool :) Good job getting the thumb stick working with it!

    View Instructable »