Loading...
  Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: December 30, 2012, 12:29:41 pm
Thanks it is great to feel appreciated!  But I'm still in doubt about the number of users.  I know my code is not perfect.  I know it is confusing at times.  Doesn't anyone have suggestions for improvements?  Bugs?  I'm really not that good.  It's been a year now.  Maybe there are many users who used my simple functions, and have not advanced to detecting torque or non-blocking code.  Don't be scared to try them!

OK, now that the stress of Christmas is almost over, I'm going to get back to this! So, are you saying that you are happy with the functional state of your library, but you'd just like someone to suggest ways of making it more clean and readable for newbies (like me!)

For example, you have:
Code:
const int mp4a = 13; // 13 is not PWM should use 6 todo later
Is that actually OK to go ahead on rely on?
2  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: December 04, 2012, 05:25:27 pm
Is there Anybody out there... there... there...

I guess you're the only one lardconcepts!

I would say that judging by the fact that your post is the 6th most viewed in this forum that there are probably LOADS of people out there appreciating your work. I know I certainly do.

Here's a way to know how many people are out there - shorten the link via somethin like goo.gl or bit.ly that gives you click stats, then stick  "s28BYJ-48 5-Volt Stepper library" in your signature and link to either the forum post, or the github gist where the code is, and I think you'll be pleasantly surprised!

Anyway, *I* thoroughly appreciate the fact that you helped bring my stepper to life without smoke or burning smell smiley
3  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: November 30, 2012, 04:00:39 pm
Hey, Steve! Great work! Going to bust out some breadboard and have a go later!

Might be an idea to let people know where to get the narcoleptic.h library from: http://code.google.com/p/narcoleptic/

Incidentally, I've just added a note to the top of my old copy to point people to your version of the library.

Thanks again, keep up the good work!
4  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: November 28, 2012, 08:30:53 am
According to your link, Step 1 and 2 are on my local machine?  But I don't have Linux.  How do I do this with windows?
Should I just start with Gist?  I get it!

Yes, you could certainly do everything you wanted with Gist. There's some more setup info and Windows apps at https://github.com/ if you DID want to make a full repository of it, but a Gist (a sort of "github-lite"!) will do perfectly for this.

Edit: Looks like you've already got an account there! https://github.com/sbright33 - if there's anything I can do to help get the new versions of the library up, please let me know.
5  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: November 27, 2012, 03:18:33 pm
Viewed 6900 times exactly!

Indeed. Which shows how popular your library is and how many people would appreciate the updates being made available!

If you have many versions, the other thing you could do would be to create a repository over at github. Then you have versioning and code commenting and people can suggest changes or improvements or bugfixes, they can follow the project and be notified of changes etc.

In fact, Arduino itself lives right there! https://github.com/arduino/Arduino

It might look scary to start with, but you'll soon see how easy it is. https://help.github.com/articles/create-a-repo

If there's anything I can do to help, please let me know.
6  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: November 27, 2012, 01:13:02 pm
Thanks for your compliments and posting my old code on Gist.  I can update that site now?  Will do it with a few different versions.

Would love to see your new versions! You can't edit my pasted code there, but creating a new account takes less than a minute and is free. You can either "fork" my copy of the code into your account, or just start again. If you want me to now remove my copy of the code I'm happy to delete it and replace it with a link to your new code.

7  Community / Website and Forum / Re: Website very slow on: November 27, 2012, 08:13:57 am
My apologies for my rant yesterday, I was out of order having a go like that. I know you are working hard, but it was incredibly frustrating as I was just trying to learn and read docs and I could see that so many things could easily be done to fix it. So instead of me just complaining, perhaps I can help a bit.

I've re-run that test and I can see that a lot of improvements have been made since then. However, there are still some simple things that would take minutes at most to help things.

The version of jquery used is 1.4.4 from 2010, over 2 years old, isn't very optimized and doesn't play well with modern browsers.
The version of mootools is from 2006(!!). Why would two overlapping frameworks be needed? jquery should do everything.

Because you're hosting jquery yourself AND browser caching isn't in use, every page load and every visit is loading 70k of (obsolete) jquery.

Let's say you have 10,000 page loads per day. Instead of hosting jquery yourself, let Google take the strain and take advantage of browser caching.

Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

Remember you can always link to the current version by omitting the .version. eg:

 
Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>

will always give you the latest 1.8 version and

 
Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

will roll you over to 1.9 when it's released if you feel brave!

Either way, that's 684Mb and 10,000 file-serves saved every single day just for changing 1 single line.

And if you HAVE to load mootools as well:
Code:
<script src="//ajax.googleapis.com/ajax/libs/mootools/1.4.5/mootools-yui-compressed.js"></script>

In addition you could switch from Apache to something fast like Nginx, and the version of php is hopelessly out of date.

nginx has been considered but actually is not an option: migration would require a large porting of current Rewrite rules, now massively used to glue together all the pieces. Not impossible, but requires some time.

Yes, it's a learning curve but it's SO worth learning. The difference between Apache+PHP mod and nginx+php5-fpm is unbelievable.
Take a look at this: http://www.garron.me/linux/apache-vs-nginx-php-fpm-varnish-apc-wordpress-performance.html

At 40 concurrent users on his 512Mb VPS, his Wordpress starts to hit 1 second response times.
With Apache + PHP with APC and Varnish he's service 150 concurrent users with a 40ms response time.

That's nearly 4 times as many users getting served 25x quicker, all from the same box.

Definitely worth looking into! And the difference between mod_rewrite and conf files isn't actually that big once you get the syntax.

Here are my 3 conf files for Wordpress, phpbb3 and ZenCart.

There's nothing you can't do with Apache .htaccess that you can't do far more efficiently with Nginx conf directives. And the nginx forum and Stackoverflow will always help you if you get stuck.

The ideal is that the only hit you see in the log on the server which you are running php + mysql is 1 single hit to serve the dynamic page content.
That's not always possible, but Cloudflare will massively help toward that too.

Quote
The very first and easiest free thing to do would be to use Cloudflare

I've observed bad performance of Cloudflare on at least one website far smaller than the Arduino's one, it impressed me quite negatively.
Did you had some positive experience?

I've be interested to know about this bad performance and what the conditions were.

Here's why I trust and use Cloudflare (and no, I don't get paid for saying this!):

Quote
"Last year, when a Web site launched by infamous hacker group LulzSec was knocked offline by a massive DDoS attack it turned to CloudFlare, a 30-person San Franicisco start-up for protection.

For the next 23 days, LulzSecurity.com stayed online, and CloudFlare, which had launched in private beta only 12 months before, withstood withering attacks from hackers around the globe.

The quality of CloudFlare’s service and its rock-bottom prices have been attracting new customers at the rate of 1,500 a day, Prince said, including Fortune 500 companies, major government agencies in the United States and abroad, and even sites owned by the White House. In two years, CloudFlare has grown so big that on any given day 25 percent of the Internet’s visitors pass through its network, Prince said. CloudFlare currently has servers running in 14 data centers around the world, including 7 in the United States, 3 in Asia and 4 in Europe."

And those figures are from Feb, so bound to be much higher. If it's good enough for 25 percent of the internet and the White House, it's good enough for me!

So, if you were to use Cloudflare, that takes care of the 20 static assets which should be being combined and minified.

http://www.webpagetest.org/result/121127_9W_N3Q/1/performance_optimization/#cache_static_content

Here's an example: I run 5 sites: 3 Wordpress, 1 busy phpbb forum and 1 horribly inefficient but busy old e-commerce system called Zen Cart - (80 db queries for the front page alone, nothing I can do about it sadly).

I run nginx, php5-fpm, apc, and varnish cache on the Wordpress sites, and Cloudflare sits in front of all of that. I run ALL of these sites from one single-core 1Gb RAM VPS costing me £10 a month.
Load rarely tops 25% according to "top", according to Google analytics my average total pageload time (all assets loaded) is 1.25 seconds, making all my sites faster than around 80% of comparable sites.

Here are my cloudflare stats for all 5 sites for the last 30 days:

Code:
51.1 GB bandwidth saved by CloudFlare
115.0 GB total bandwidth

3,844,627 requests saved by CloudFlare
5,232,005 total requests

777,088 Page views
581,657 regular traffic
95,391 crawlers/bots
100,040 threats

That's 100,000 pageviews saved from hackers even getting to your site.

And the advantage of Cloudflare is, if you don't like it, you login to the control panel and switch it off instantly.
Total time: 3 minutes to make a new Cloudflare account. 2 minutes to login to your registrar and change the name servers. (Plus propogation time of course!).
8  Community / Website and Forum / Re: Website very slow on: November 26, 2012, 03:21:27 pm
No offence intended, but this site urgently needs someone who knows how to run a webserver to get involved.

I've never seen a site fail so badly on so many points - http://www.webpagetest.org/result/121126_PQ_HFC/

There are LOADS of suggestions there that could easily be implemented and would massively speed the site up.
In addition you could switch from Apache to something fast like Nginx, and the version of php is hopelessly out of date.
The very first and easiest free thing to do would be to use Cloudflare; that would take at least 50% of the load of the server and do a lot of optimisation.
Then you could add in Varnish cache - end result: 200ms page response times rather than 20seconds, net cost: half a day of the time of someone that knows what they're doing. No need to spend money on new servers.

But in short, this site isn't suffering because of visitor count, it's suffering because it's hopelessly unoptimised and urgently needs some TLC.
9  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: November 26, 2012, 03:15:14 pm
My newer library is on another thread here.  Many improvements.  More coming.  PWM to make it smoother.  Non-blocking to free up the processor for other tasks.  Higher voltage to increase performance without getting hot...

Hi sbright33, many thanks for your library. But I cannot find this newer version. Would you mind sharing the link?

I'm glad I found this, because with the standard library 28BYJ was getting very hot an not really behaving well!

I had trouble cobbling the code together from the various bits in this thread. Is there any particular reason to be pasting inline rather than just use a standard code-bin like pastebin or gist? If it helps anyone else, I put the latest version I could find on https://gist.github.com/4149982

The advantage of using something like Gist is that you can update the one file whenever you like and the forum link will always be up to date then.

Please don't take this as any criticism of your excellent library - it's just a newbie asking a newbie question!
10  General Category / General Discussion / Re: New Member on: November 26, 2012, 03:05:20 pm
Might as well use this thread to try and introduce myself, although I'm having major trouble with the site today.
I don't think it's just me as isup.me says arduino.cc is down to. I either get timeouts or 10 second+ page load times.

Anyway, Hello, I'm Jon, based in mid-Wales, interested in making products for people with visual impairments.

I had a great training course recently at BCA in Birmingham with Arduino-evangelist Garry Bulmer who was running an excellent one-day course.

I was so enthused I bought an Arduino Uno kit on the spot and was chuffed when, two evenings later with nothing more than the Uno, 1 switch, 1 resistor, 1 speaker and 3 bits of wire, I had the Uno saying "ready" and then "button up" or "button down" depending on the state.

Having never done MCU fiddling before, and my programming knowledge limited to PHP, I was quite pleased. Next project is to  see if I can make a light activated chicken-run door opener for under £20 using one of those £10 Mini Light's.

Things I want to do to start with to get going before the “proper” stuff...

  • Make a kitchen countdown timer that rings a little handbell for a few seconds.
  • Make a chicken door opener. Both for under £10 each.
Eventually I want to....

  • Build a data logger which will intercept and log the NIBE heat pump status and running time data from the external F2015 unit to the SMO 05 controller which runs on a CAT5 cable (once I’ve found out the data protocol!).
  • Interface with the IR interface “eye” of my electricity meter and log hourly readings of the actual energy usage (as opposed to the highly inaccurate but cheap clamp-the-wire monitors).
In fact, it turns out someone's already doing an Arduino project for the latter! Well, I'm here, I'm learning, I hope I can contribute one day.
Pages: [1]