Show Posts
Pages: [1] 2
1  Using Arduino / Microcontrollers / Re: Uploading Bootloader and Sketch at the same time? on: October 14, 2013, 06:08:04 pm
A follow on question. From reading the articles am I right that the Sketch when uploaded starts at 0000hx while the bootloader, depending on it's sizes starts at one of the following:

7000: 4096 byte bootloader/
7800: 2048 byte bootloader
7C00: 1024 byte bootloader
7E00: 512 byte bootloader

Meaning if I wanted to manually create a 32K hex file I could take the original sketch hex and the relevant hex file for the bootloader being used and put them together in a 32k hex file.

I assume I wouldn't have to care about what's between the Sketch hex and the Bootloader hex?
Also, even if the bootloader is smaller than 4096 (and space permitting) could I start all versions of a bootloader at 7000?
2  Using Arduino / Microcontrollers / Re: Uploading Bootloader and Sketch at the same time? on: October 14, 2013, 05:41:45 pm
http://www.gammon.com.au/forum/?id=11635

That uploads a bootloader in about a second. You could modify it to add a sketch as well. Or use this:

http://www.gammon.com.au/forum/?id=11638

Thank you. This looks like  exactly what I'm looking for.
If only I'm smart enough to figure it out...

Based on this guide. It would be great to read a 328 with bootloader and sketch to a microSD card then program it back to blank 328s.

Again thanks,
Albert.

3  Using Arduino / Microcontrollers / Uploading Bootloader and Sketch at the same time? on: October 14, 2013, 04:18:52 pm
Is there any easy way to upload the Arduino Bootloader and a Sketch to the Atmega 328 using an Arduino as the programming platform?
I'm looking to put together a project for our hackspace and so may need to add the bootloader and sketches to a lot of ICs.

Any pointers appreciated,
Albert.
4  Using Arduino / Motors, Mechanics, and Power / Re: Stepper motor, doesn't turn counter clockwise, wrong steps number indication on: April 02, 2013, 09:56:46 am
The suggestions froin Zaplady and davidtraynor work for me with my cheap ebayed stepper motors.
Like Zaplady mine came with a ULN2003 driver board with LEDs.
These things can now get purchased for less than £2.00.
So, assuming complete accuracy and the funky cross over wiring isn't a problem then they look like a good tinkerer option.

As a side note. When I wired mine up first time and used the same sketch it went clockwise and anti-clockwise with no modifications. I then disconnected the driver and motor to test my second one and it would only go clockwise. Re-attached the original and it would only go clockwise as well.
So, strange behaviour but then for £2.00 each I expect some slight fun in getting them working.

Thank you Zaplady and david traynor.

Albert.
5  Topics / Home Automation and Networked Objects / Re: webserver for 5 relays on: September 18, 2012, 06:08:13 am
Hi,

I was doing something similar but controlling from a PC based webserver.
The Arduino is running a web server sketch as well and reading the HTTP Request details for the actions.
With this you can control 5 relays

Below is the link to the details:
http://winkleink.blogspot.co.uk/2012/08/arduino-ethernet-ethercard-xamp-web.html

Look at the Arduino Code to see how it's done.

I have since modified the PC server PHP code so it can control any number of Arduinos and Pins by storing the details in a mySQL database.

Hopefully, this helps.

Winkleink.
6  Community / Exhibition / Gallery / Re: Arduino, ENC28J60, XAMP, PHP, Controlling 2 LEDS on: September 17, 2012, 06:40:27 pm
I got a bit of time to play with this again.
Now the webserver code calls the details from a mySQL database for each Arduino and then for each pin being used in each Arduino.
This effectively allows you to control as many pins as you want on any number of Arduinos , only limited by your IP addresses and patience to enter them all in.

Updated blog post with the details of the database and the revised PHP code.
WARNING: The PHP code is very much first pass. There are lots of areas it could be improved. But while I'm working on it, it makes sense to me.

http://winkleink.blogspot.co.uk/2012/08/arduino-ethernet-ethercard-xamp-web.html

Next step is to code a few pages to allow the adding/removing of Arduino and Pins without having to resort to mySqlAdmin.  Once done I need to figure out how to get the status of the pins from the webserver running on the Arduino. The examples I have seen for the ENC28J60 have been presenting a PROGMEM page, so cannot be modified once the code has started.

All the fun...
7  Community / Exhibition / Gallery / Re: Arduino, ENC28J60, XAMP, PHP, Controlling 2 LEDS on: August 29, 2012, 01:37:40 am
Would it be possible to make the 2 buttons show the status of the LED? (for example, if the LED is ON, the ON button should be dimmed)

Yes, next stage is to use a database to store details of arduinos and pins.
Once that is done I'll be adding the ability to get the status of the pins during the request so it can be shown.

The ultimate idea is to create a web interface for controlling an unlimited number of Arduinos over ethernet so a little bit to go.
8  Community / Exhibition / Gallery / Arduino, ENC28J60, XAMP, PHP, Controlling 2 LEDS on: August 25, 2012, 04:55:19 pm
I've been playing with the ENC28J60 for a few months and even thought it isn't as easy to work with as the official EtherShield it is still a great (really cheap) bit of kit)
One of my goals was to control the Arduino Pins from a web page.  Kind of home automation type scenario.
This is the first step in that direction.

I have a XAMP web server installed on my netbook with delivers a PHP web page to the browser.
The web page gives me the options to turn on or off 2 LEDs on pins 2 and 4 of the Arduino.
When I press a button the web page is called again and in the background the web server does an fopen() call to the Arduino with the requested action.
By using fopen() the actual command sent to the Arduino is not seen by the user.

The below video shows it working and in the description on Youtube there is a link to my blog with further details and the code for the web server and the Arduino.


All feedback appreciated.

Winkleink.
9  Community / Exhibition / Gallery / Re: TVOut - Game - Columns - Code now on Blog on: May 06, 2012, 04:41:08 pm
I did the clean up of the code.
Used one of the formatting tools to sorted out the indentatio and added more comments so it should (hopefully) be easy to understand.

I've put a link to the code on my blog (so I only have to manage 1 link)
So, if you want the code just follow the link below 
http://winkleink.blogspot.co.uk/2012/05/arduino-tvout-game-columns.html
10  Community / Exhibition / Gallery / Re: TVOut - Game - Columns on: May 04, 2012, 04:50:46 am
Smooth, really cool.

It thing it must be possible to get lower sram use. Maybe you should check The games on hackvision or Wayne and layne's Video game shield. But probable you already did.


I expect your right in reducing the SRAM . My understanding is that the Hackvision and Wayne and Iayne's shield both use the TVOut Library by Myles Metzler and their games are far more complex then anything I am producing
You can store graphics in the 32K of FLASH memory on the Arduino so extra graphics to some extend reduces the memory usage.

My understanding is that a resolution of 120x96 uses 1,440 bytes (120x96/8), leaving 608 bytes for all other variables.
There are 2 byte arrays for the playing area 13x6 (78 bytes). One for the display and the other for when I'm checking for 3s.  Another 156 Bytes, leaving 452.
Any text on screen takes up SRAM as well.
There are about 50 Bytes used for the opening text and 27 for the GAME OVER screen, so another 72 BYTES
Leaving 380 bytes.

Then there is the SRAM used by the TVOut Library just to function. I have no idea how it uses.

So, it got pretty tight in there. 

Looking at that HackVision the closest program I would expect is Tetris. In that case all blocks once placed are the same so there is no need to record the different types of blocks at each position.  It would be possible to use the get_pixel(x,y) command to check if a block has been placed at a location.

That said I know my code is not optimised. I learned to code on a VIC-20/C64 back in the 80's and it's still the same coding practices I use now. One of these days I'll figure out how to program in C++ properly.   I looked at some of the HackVison code and it is way beyond what I have done.

That's the great thing about the Arduino.  Even basic programmers like me can put together something that works.  Then there is the opportunity to learn and refine and get even better without it being overwhelming at any time.


11  Community / Exhibition / Gallery / TVOut - Game - Columns on: May 03, 2012, 08:27:34 am
I posted this in the [Using Arduino :: Displays ::] forum and somebody suggested I put it in the Exhibition Forum, so I'm posting here also.  If I've done this the wrong way I'm sorry. 

I saw the TVOut ( http://code.google.com/p/arduino-tvout/ ) library about a year ago and finally got to do some hacking with it.
I decided that I would recreate the classic game Columns which has the fell of Tetris, but isn't
In columns it is always 3 blocks that fall vertically.  You can move the blocks left and right and rotate the 3 blocks, so the top one goes to the middle, the middle to the bottom and the bottom to the top.
The goal is get 3 in a row, either vertically, horizontally or diagonally.
Then those 3 pieces are removed and the blocks above fall down.

The code is still a bit of a mess, so needs a little bit of cleaning up before I make it public (which I will).  If you want a copy of the rough, nasty typo comment filled code let me know and I'd be happy to send it on.

The controls are just 3 tactile button on a breadboard, so this should work on any 328 based Arduino (needs 2K of SRAM as the display alone takes 1,440 bytes)

I have done a short video of it working on YouTube.



All I can say is Thank You to mdmetzle for creating a fantastic Library that made this possible.
12  Using Arduino / Displays / Re: TVOut - Game - Columns on: May 03, 2012, 07:53:29 am
That's awesome! Why not sharing on the exhibition board? What game controller/keypad are you using?

I didn't know about the  exhibition board.  I'm going to check it out now.

Keypad is just 3 push button switched mounted on a breadboard.  Nothing fancy.
This type of thing. http://www.earthshineelectronics.com/components/28-6mm-tactile-switch-pack-of-10.html
So, the code should work with any 328 based Arduino.


@Osgeld - Me too, I find Columns far more enjoyable to play so I thought I'd see if I could make it myself.


13  Using Arduino / Displays / TVOut - Game - Columns on: May 01, 2012, 05:11:56 pm

I saw the TVOut library about a year ago and finally got to do some hacking with it.
I decided that I would recreate the classic game Columns which has the fell of Tetris, but isn't

The code is still a bit of a mess, so needs a little bit of cleaning up before I make it public (which I will)

I have done a short video of it work on YouTube.


All I can say is Thank You to mdmetzle for creating a fantastic Library that made this possible.

14  Using Arduino / Programming Questions / Re: Advice wanted: programming book for Arduino on: January 30, 2012, 05:04:06 am
PaulS & jack,

Thanks for the recommendations. I sue to own a copy of Kernighan and Ritchie C book about 25 years ago but it's been lost in the many moves.  I'll start with http://www.cplusplus.com/ and see how I get on.
I'm trying to use libraries by reading the sample code and sometime the syntax and coding is beating me.

Again, thanks for the advice.
Albert.

15  Using Arduino / Programming Questions / Advice wanted: programming book for Arduino on: January 29, 2012, 07:13:25 pm
Hi,

I've been playing with Arduino for about a year and I'm happy that for the most part I can figure out the electronics and wiring.
Where I'm struggling is with the 'advanced' coding.
Things like pointers, changing variable types, creating my own libraries,...


So, I would appreciate recommendations for books or online resources that will help me.

Thanks,
Albert.
Pages: [1] 2