Sponsored Content
Top Forums Programming Very Basic Arduino Uno Board Testing Post 303042234 by Neo on Thursday 19th of December 2019 11:05:06 AM
Old 12-19-2019
Quote:
Originally Posted by hicksd8
PS. Had to upload files as .txt - site refuses to upload .ino
FYI:

If you gzip the .ino file, you can upload it.

Smilie

OBTW, I have a 5 meter strip of LED lights (red, blue, green) I got from Aliexpress for about $4 dollars, including an IR controller. I was thinking to plug the strip directly (omitting the IR controller that came with the strip) into an Arduino project for fun as well. It's currently running off an old car battery on my balcony.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use The Terminal To Test Arduino Is Working.

Hi all... (Apologies for any typos at all.) This is a step by step _script_ to check if your Arduino is talking to your Linux or Macbook Pro computer using the Terminal... It works on at least 3 Linux flavours and now the Macbook Pro... I hope you find it useful as a simple check for... (0 Replies)
Discussion started by: wisecracker
0 Replies

2. OS X (Apple)

Arduino Diecimila Board Access...

This is a very simple starter DEMO to access Arduino Diecimila Board for the Macbook Pro 13" OSX 10.7.5... A potentiometer is connected between 5V and Gnd with the wiper connected to ANALOG IN 0 on the Arduino. This was adjusted to give the Ms and Ls as seen... I now have DC in for this... (0 Replies)
Discussion started by: wisecracker
0 Replies

3. OS X (Apple)

Semi-Automatic Arduino Detection.

I am working on a semi-auto detection idea for Arduino for the Scope project. It does require a little user intervention but minimal. It works by just responding to two on screen prompts to unplug and plug Arduino into a USB port. There are two versions and both work perfectly well and give... (3 Replies)
Discussion started by: wisecracker
3 Replies

4. Programming

Arduino-cli - Uploading to Unknown Chinese Arduino Boards using the Arduino Command Line Interface

In my further exploration of Arduino, today I decided to install the arduino-cli on my mac today. https://github.com/arduino/arduino-cli I followed the instructions for macOS but when I got to this part: arduino-cli board list I got the dreaded "Unknown" Fully Qualified Board Name... (1 Reply)
Discussion started by: Neo
1 Replies

5. Programming

More Arduino Stuff...

HI all... (Apologies for any typos.) To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format. Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes. I have noticed that there are current... (6 Replies)
Discussion started by: wisecracker
6 Replies

6. Programming

Chinese Arduino UNO Clones - The Wavgat versus the generic UNO R3 Clone - The Winner Is?

Waiting for more fun Ardunio parts from AliExpress, I decided to test two cheap Chinese Arduino UNO clones. The Arduino UNO R3 (CH340G) MEGA328P The Wavgat UNO R3 (CH340G) MEGA328P Both of these Chinese Ardunio clones sell for about $3 USD, delivered to your door. The bottom line is... (0 Replies)
Discussion started by: Neo
0 Replies

7. Programming

Arduino UNIX Time - Syncing Computer UNIX Time to Arduino Time with Python

Just finished a quick Python script to send the current unix time over to the Arduino from macOS, so in the absence of GPS or some other way to get the unix timestamp (epoch time) to the Arduino, I can get my macOS and Arduino UNO synced to within a second. Normally, when the Arduino starts... (9 Replies)
Discussion started by: Neo
9 Replies

8. Programming

Basic Arduino UNO Bluetooth Testing with the BLE 4.0 (CC2541, MLT-BT04 IC)

Here is a sketch to do basic testing for the Arduino UNO and the MLT-BT04. This BLE module works with IOS (iPhone) and I'll add some details on my IOS testing with an iPhone in a follow-up post. For now, here is the basic BLE (HM-10) sketch for the Arduino UNO: /* Arduino test-code... (7 Replies)
Discussion started by: Neo
7 Replies
Test::Simple(3pm)					 Perl Programmers Reference Guide					 Test::Simple(3pm)

NAME
Test::Simple - Basic utilities for writing tests. SYNOPSIS
use Test::Simple tests => 1; ok( $foo eq $bar, 'foo is bar' ); DESCRIPTION
** If you are unfamiliar with testing read Test::Tutorial first! ** This is an extremely simple, extremely basic module for writing tests suitable for CPAN modules and other pursuits. If you wish to do more complicated testing, use the Test::More module (a drop-in replacement for this one). The basic unit of Perl testing is the ok. For each thing you want to test your program will print out an "ok" or "not ok" to indicate pass or fail. You do this with the ok() function (see below). The only other constraint is you must pre-declare how many tests you plan to run. This is in case something goes horribly wrong during the test and your test program aborts, or skips a test or whatever. You do this like so: use Test::Simple tests => 23; You must have a plan. ok ok( $foo eq $bar, $name ); ok( $foo eq $bar ); ok() is given an expression (in this case "$foo eq $bar"). If it's true, the test passed. If it's false, it didn't. That's about it. ok() prints out either "ok" or "not ok" along with a test number (it keeps track of that for you). # This produces "ok 1 - Hell not yet frozen over" (or not ok) ok( get_temperature($hell) > 0, 'Hell not yet frozen over' ); If you provide a $name, that will be printed along with the "ok/not ok" to make it easier to find your test when if fails (just search for the name). It also makes it easier for the next guy to understand what your test is for. It's highly recommended you use test names. All tests are run in scalar context. So this: ok( @stuff, 'I have some stuff' ); will do what you mean (fail if stuff is empty) Test::Simple will start by printing number of tests run in the form "1..M" (so "1..5" means you're going to run 5 tests). This strange format lets Test::Harness know how many tests you plan on running in case something goes horribly wrong. If all your tests passed, Test::Simple will exit with zero (which is normal). If anything failed it will exit with how many failed. If you run less (or more) tests than you planned, the missing (or extras) will be considered failures. If no tests were ever run Test::Simple will throw a warning and exit with 255. If the test died, even after having successfully completed all its tests, it will still be considered a failure and will exit with 255. So the exit codes are... 0 all tests successful 255 test died or all passed but wrong # of tests run any other number how many failed (including missing or extras) If you fail more than 254 tests, it will be reported as 254. This module is by no means trying to be a complete testing system. It's just to get you started. Once you're off the ground its recommended you look at Test::More. EXAMPLE
Here's an example of a simple .t file for the fictional Film module. use Test::Simple tests => 5; use Film; # What you're testing. my $btaste = Film->new({ Title => 'Bad Taste', Director => 'Peter Jackson', Rating => 'R', NumExplodingSheep => 1 }); ok( defined($btaste) && ref $btaste eq 'Film', 'new() works' ); ok( $btaste->Title eq 'Bad Taste', 'Title() get' ); ok( $btaste->Director eq 'Peter Jackson', 'Director() get' ); ok( $btaste->Rating eq 'R', 'Rating() get' ); ok( $btaste->NumExplodingSheep == 1, 'NumExplodingSheep() get' ); It will produce output like this: 1..5 ok 1 - new() works ok 2 - Title() get ok 3 - Director() get not ok 4 - Rating() get # Failed test 'Rating() get' # in t/film.t at line 14. ok 5 - NumExplodingSheep() get # Looks like you failed 1 tests of 5 Indicating the Film::Rating() method is broken. CAVEATS
Test::Simple will only report a maximum of 254 failures in its exit code. If this is a problem, you probably have a huge test script. Split it into multiple files. (Otherwise blame the Unix folks for using an unsigned short integer as the exit status). Because VMS's exit codes are much, much different than the rest of the universe, and perl does horrible mangling to them that gets in my way, it works like this on VMS. 0 SS$_NORMAL all tests successful 4 SS$_ABORT something went wrong Unfortunately, I can't differentiate any further. NOTES
Test::Simple is explicitly tested all the way back to perl 5.6.0. Test::Simple is thread-safe in perl 5.8.1 and up. HISTORY
This module was conceived while talking with Tony Bowden in his kitchen one night about the problems I was having writing some really complicated feature into the new Testing module. He observed that the main problem is not dealing with these edge cases but that people hate to write tests at all. What was needed was a dead simple module that took all the hard work out of testing and was really, really easy to learn. Paul Johnson simultaneously had this idea (unfortunately, he wasn't in Tony's kitchen). This is it. SEE ALSO
Test::More More testing functions! Once you outgrow Test::Simple, look at Test::More. Test::Simple is 100% forward compatible with Test::More (i.e. you can just use Test::More instead of Test::Simple in your programs and things will still work). Look in Test::More's SEE ALSO for more testing modules. AUTHORS
Idea by Tony Bowden and Paul Johnson, code by Michael G Schwern <schwern@pobox.com>, wardrobe by Calvin Klein. COPYRIGHT
Copyright 2001-2008 by Michael G Schwern <schwern@pobox.com>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.18.2 2014-01-06 Test::Simple(3pm)
All times are GMT -4. The time now is 09:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy