Show Posts
Pages: [1] 2 3 ... 120
1  Community / Exhibition / Gallery / Re: Developed Pulsoximeter with 2 Arduinos. on: August 19, 2014, 10:31:58 am
@
die_Diode:

Nice project.  My wife is a nurse and I bought her one just to play with for about $20 off the eBay site.  It is Chinese but has an OLED screen and a graph function.  She has compared the results with the (seriously more expensive) office device and the two correlate.

Which brings me to the question, "Why?"  I know that in my playing around that I build lots of items that are primarily just for fun.  I usually take pictures, post the project, pixs, and code and then disassemble the unit.  From the looks of it, your unit is here to stay and the fact that you have access to a clinical unit for comparison seems to indicate that you have a use for the device.  So, is the attraction that you can interface your unit, save results, compare data on a PC, or perhaps further enhance to become an Internet thing?  Your BOM is greater than $20, so no criticism, just trying to understand.

Ray
2  Community / Exhibition / Gallery / Re: using Arduino for bypas the throttle on a quadcopter for auto height on kk2.0 on: August 19, 2014, 10:09:47 am
i think this is to hard  smiley-draw
i have 2000 readers in 2 weeks so there is a interest in subject  ,, i ask the same  ,why
maybe  they want more movies , and proof of concept ,,
people like to take stuff , or learn for there own project ,
but not have the money to build ,, or the time ,,
i now for sure there are a lot of people using the sketch for other things ,,
addon for quadcopter , boats , and other rc stuff ,,
and i thinks the complete package looks hard to make ,
but the hardware and sketches i use are safe to use ,,  smiley-grin
maybe people are scarred ,, this is why a lot of people buy stuff , and not build it ,,
but yes you are the first one ,,
and yes i also removed some post , because if there is no interest why should i share my time and work ,
maybe you know the answer ,,

you read the post , the subject ,, is this hard to understand ??
let me know ! smiley

@Dexterbot:
Here is what I know:
  • You should be thankful that out of 2000 views, you had no questions! Maybe folks just understood your work.
  • With no feedback, how do you know folks are "using your code for other things?"  Are you clairvoyant? (Rhetorical.)
  • Posting and removing is (IMO) just wrong, very wrong; it is selfish and childish.
  • On one forum, I have 7981 reads of a post and not one single question - I must have done something right!

Posting on any forum, Arduino.cc in particular, is not going to start a parade down your street.

  • Post because you are enthused about your hobby. 
  • Share because you want to further the art. 
  • Enlighten yourself from the works of others.


Ray
3  Using Arduino / Programming Questions / Re: Send text to Arduino via serial port on: August 16, 2014, 07:02:32 pm
Hi,
I need to send letter to arduino via serial port, but I got only the number (i think it's called decimal value, my english is bad) and i could not convert it back to letter. It is possible to convert it, or  should i use

Code:
if ( input == 116) //if I send "t"
{
    //something
}
?
Thanks.
(sorry for my bad english)

The code in my calculator example shows several ways to handle serial input of characters, integers, and decimal numbers
http://www.hackster.io/rayburne/scientific-calculator

Ray
4  Using Arduino / Microcontrollers / Re: Comprehensive ATtiny libraries overview? on: August 15, 2014, 08:40:32 pm
Also, look at Adafruit's Trinket and Digistump's Digispark which are both tiny85 based.  Lots of code and workaround is available.

Ray
5  Using Arduino / Microcontrollers / Re: Multiple Serial Monitors? on: August 13, 2014, 07:31:45 am
This is what those little LCD screens are for...

Agreed!  And they are (currently) cheap.  Just posted about this 1.44" 128x128 under $4 U.S.
http://forum.arduino.cc/index.php?topic=260605.msg1840012#msg1840012

Ray
6  Using Arduino / Programming Questions / Re: temperature flickering. on: August 12, 2014, 08:05:10 pm
Thanks for the answers. I can see what you mean by the functions and will try that tomorrow (getting late here)

as for the array that one i dont get. (complete newbie at coding tbh,) whats the difference between index and array ?


This will show how an array can be used to average temperature:
http://arduino.cc/en/Tutorial/Smoothing

Ray
7  Using Arduino / Microcontrollers / Re: Multiple Serial Monitors? on: August 12, 2014, 06:57:38 pm
Quote
multiple serial monitors

I use the free TeraTerm Windows program.  Very light weight code with good features.
Just Google for it.

Ray
8  Using Arduino / Microcontrollers / Re: On board Memory? on: August 12, 2014, 06:54:38 pm
Is it possible for Arduino Uno to store a few values s on board when power is off like it does the program but still be able to change those values when it is on? Or do I need an eeprom?

If you need some working sample code,
http://forum.arduino.cc/index.php?topic=169826.0

I use eeprom to store the Nokia LCD contrast number and the Morse Code WPM value.

Ray
9  Using Arduino / Displays / 1.44 inch TFT 128x128 GLCD ILI9163 on: August 12, 2014, 11:07:51 am
I don't get around these parts much anymore as I have been off doing PSoC designs; however, I just got in a couple of TFT GLCD color 128x128 for testing last week:
http://www.ebay.com/itm/310876068105
and was having some issues with the PSoC 4200 so I figured I would back-up and work out the signaling with the Arduino first.  I did a quick scan in Advanced Search and did not find anything here, so I thought I would post this information; all credit to sumotoy on http://forum.pjrc.com/threads/25862-ILI9163C-128x128-TFT-driver

The test code (zip) is by sumotoy as is his TFT library:
https://github.com/sumotoy/TFT_ILI9163C
You will also need the Adafruit GFX libray:
https://github.com/adafruit/Adafruit-GFX-Library

- Compiled under 1.0.5r2 for Nano running at 3.3V (yes, out of spec.)  

- I placed a solder-bridge (jump) across J1 on the rear of the display carrier to effectively short the IC regulator (65Z5) although the test unit did work without the solder-jumper at precisely 3.3Volts.  

- Note that the LED backlight on this display has a 10 Ohm resistor on the display carrier board that I received... double-check this before connecting the LED power pin to 3.3V.


Ray

Note: as my intent is to use this display with the PSoC 4200 and since the source and libraries were NOT changed, please do not expect me to respond to assistance requests - I am simply posting working code and heading back to working out my ARM issues.  Use this thread to state your experience or request forum members assistance.  Thanks.

Edited to correct link
http://youtu.be/RLDTBaXMmX4
10  Development / Other Hardware Development / Re: $4 Cypress PSoC 4/ 4200 Prototype Board on: August 08, 2014, 10:36:14 am

 mrburnette,

 Thanks for sharing your experience with PSOC. I have started working with the boards and have found it difficult at first but, I am starting to make some progress. It does seem that the chips have a lot of potential! I am going to try the 100 projects for sure and practice will make perfect, I hope!


Mark
 


Mark,
The "100 Projects..." is now a year old, so the newest version of Creator 3.0SP1 will want you to upgrade the components as you import them into the environment.  So far, I have done a few of these and upgraded without issue.  I think the one project that is problematic is the Color GLCD + SD... there is a new SD component in the PSoC 4 forum that you will need to download and import.

There ARE other things you need to know:
Quote
GCC Implementation
PSoC Creator integrates the GCC ARM Embedded compiler including making the Newlib-nano and
newlib libraries. Refer to the Red Hat newlib C Library for the C library reference manual.
The newlib-nano is configured by default.
To choose newlib library, open the
• Build Settings dialog >
• ARM GCC 4.7.3 >
• Linker >
• General,
and set the “Use newlib-nano” option to False.
By default, with the GNU ARM compiler, the string formatting functions in the C run-time library return
empty strings for floating-point conversions. The newlib-nano library is a stripped-down version of the full
C newlib. It does not include support for floating point formatting and other memory-intensive features.
Startup and Linking
There are two solutions to this problem:
• enable floating-point formatting support in newlib-nano, or
• change the library to the full newlib.
To enable floating-point formatting, open the Build Settings dialog, go to the Linker page, and add the
string -u _printf_float to the command line options. This change will result in an increase in Flash
and RAM usage in your application.
Note If you also wish to use the scanf functions with floating-point numbers you should add the string
–u _scanf_float as well, with another increase in Flash and RAM usage.

Quote
INCLUDING MATH LIBRARIES FOR TRIG FUNCTIONS:
• go to "Project" / "Build Settings..."
• select the "Linker" settings
• add "m" to the "Additional libraries" line (just that one character)
• Apply / OK
This pulls in the math library for linking

There is a rewritten user supplied sprintf() component which seems to work fine for sending debugging info to the serial terminal.  The component/code is in the 100 Projects project:
http://www.element14.com/community/message/78621/l/psoc-4-pioneer-kit-community-project023-tinyprintf-example#78621

Code:
/* print variables using printf */
printf("%d", d);
NewLine();
printf("%u", u);
NewLine();
printf("%x", u);
NewLine();
printf("%X", u);
NewLine();
printf("%c", c);
NewLine();
printf("%s", s);
NewLine();

/* sprintf examples */

UART_UartPutString("sprintf Examples");
NewLine();
NewLine();

sprintf(buffer, "signed decimal: %d",d);
UART_UartPutString(buffer);
NewLine();

sprintf(buffer, "unsigned decimal: %u",u);
UART_UartPutString(buffer);
NewLine();

sprintf(buffer, "lower case hex: %x",u);
UART_UartPutString(buffer);
NewLine();

sprintf(buffer, "uppper case hex: %X",u);
UART_UartPutString(buffer);
NewLine();

sprintf(buffer, "character: %c",c);
UART_UartPutString(buffer);
NewLine();

sprintf(buffer, "string: %s",s);
UART_UartPutString(buffer);

11  Using Arduino / Microcontrollers / Re: Downloading hex from the Atmega on: August 06, 2014, 09:46:04 pm
I can upload via avr dude, tried searching google but it mostly came up with info bypassing security bit locks... I have a chinese delivered chip with Ardutester (which version I have no clue) I want to copy the hex and then compare it with older versions in hex form...

The latest ardutester is apparently buggy, so the curiosity of which version is getting to me, so before I go build it I want to grab the firmware and while at it strip down the latest ardutester code to make it more stable.. so Im dying to discover more about the firmware, has it been stripped down? New version fixed? If so more of a reason to grab a copy...

Anyway can it be done with an Arduino via ISP (same method to flash the firmware/bootloader)?

You can use my Windows script to copy (&paste) or strip out what you need!

http://www.hackster.io/rayburne/avr-firmware-duplicator

Ray

PS... If you find a stable source for Ardutester I would be interested.  Somewhere with menu changes the code went belly-up and I never kept an archive copy.
12  Using Arduino / Microcontrollers / Re: NEED that other IO pin on: August 02, 2014, 06:58:47 pm
@alah

You can burn the fuses from a command window:
http://www.ladyada.net/learn/avr/fuses.html

When you use Reset as an I/O, it is a one-way decision using Arduino as ISP.  Simply put, to undo such a change requires a high-voltage programmer.  But as long as the HEX is the way you want it to be, ArduinoISP will do the job.

Ray
13  Using Arduino / Microcontrollers / Re: How do I actually code this? on: August 02, 2014, 06:52:34 pm
Download the HEX
Use ArduinoISP on your UNO or Nick Gammon's programmer to program the tiny85

Ray
14  Development / Other Hardware Development / Re: $4 Cypress PSoC 4/ 4200 Prototype Board on: July 29, 2014, 10:32:06 pm
Note: not wishing to post PSoC on the Arduino board, I have added a few  PSoC projects to my blog here:
http://www.hackster.io/rayburne



Hi Ray,
That is great to find your post. I was just trying to tie the same hardware together (PSOC4 board and 2.2" SPI TFT).
Tonight and unsuccessfully!

If you would not mind, could you post or send me your PSOC project , so that I could look through how you got it working?
Thanks,
Bill

Bill,

I gutted much of this project:
http://www.cypress.com/?app=forum&id=4749&rID=91643
You may wish to download as I removed the SD  but if you have problems, PM me and I will email you what I have.

Ray

Edited to add close-up of PSoC 4200 connections to TFT.  Note that the very lowest pin on the breadboard is a cut-off jumper (short yellow end at MISO) and is there only to help me align the pins - there is no connection.  Only Vdd (3.3), Gnd, CS, SCK, MOSI, and DC.  Reset on the TFT is tied to VDD through a 10K resistor (optional, you can directly connect if desired.)  The LED current limiting resistor is around 22 Ohms but can go down to about 10 Ohms if absolutely necessary to have the brightest display.
15  Development / Other Hardware Development / Re: $4 Cypress PSoC 4 - 4100 + Nokia 5100 code sample on: July 27, 2014, 10:41:46 am
The code for the Nokia 5110/PSoC 4100

Code:
/* ========================================
        M. Ray Burnette - Nokia B/W GLCD + 6 Channel A-D
        20140725 - Please reference "Credits_Licenses.txt"
        All code by Ray is Public Domain
        Note: Modified heap and stack constants
        Flash used: 10424 of 32768 bytes (31.8 %).
        SRAM used: 1888 of 4096 bytes (46.1 %).
 * ========================================
*/
#define GLCD_DEVICE_PSOC           //PSoC
#define GLCD_CONTROLLER_PCD8544    //Controller
#define CR 0x0D
#define LF 0x0A
#define CLEAR_SCREEN        (0x0C)
#define CONVERT_TO_ASCII    (0x30u)
#define NewLine() UART_UartPutChar(CR); UART_UartPutChar(LF);   // Used to insert a CR/LF

#include <project.h>
#include "glcd/glcd.h"
#include "glcd/fonts/font5x7.h" // Fonts for Nokia 5110
#include <ADCmux.h>             // structures

// Function Prototypes
void UART_UartPutString();

void initHarware()
{
    UART_Start();               // Property sheet sets default @9600 BAUD
    CyGlobalIntEnable;          //Enable Interrupts
    glcd_init();
    glcd_set_contrast(75);      //0== light 100==full black
    // remaining hardware initializations
    ADCmux_Start();
    ADCmux_StartConvert();   
    CyGlobalIntEnable;
    GLCD_TEXT_INIT();
}

void putdata ( void* p, char c) // part of tinyprintf() see "PrintExamples.txt"
{
UART_UartPutChar(c);
}

/* tinyprintf supports the following formats:
    'd' int as a signed decimal number
    'u' uint as a decimal number
    'c' character
    's' null terminated string
    'x' / 'X' hexadecimal with lower / upper case letters   */

// Global variables
int8 d = -10;
uint8 u = 127;
char c = 'c';                           // uint8_t c = 32;

uint8_t len = GLCD_LCD_WIDTH / 6;
    // char string[GLCD_LCD_WIDTH / 6 + 1]; // LCD line buffer
// char buffer[50];                     // serial tty original line buffer
    char buffer[GLCD_LCD_WIDTH / 6 + 1];
    // Variables for A--> D results Ports P2[0] - P2[5]
    int16 result0;
    int16 result1;
    int16 result2;
    int16 result3;
    int16 result4;
    int16 result5;


int main()
{
    // activate PSoC hardware modules
    initHarware();

    // Announce activity to PC over serial console
    UART_UartPutString("Hardware Configured\n"); NewLine(); NewLine();
init_printf(NULL, putdata);

    for(;;)
    {
        // Read all 6 of the AD channels and output
        // Single ended 4096 slices = 2.048V max = 0.500mV / slice
        ADCmux_IsEndConversion(ADCmux_WAIT_FOR_RESULT); // blocking

        result0 = ADCmux_GetResult16(0) / 2 ;
    sprintf(buffer, "Ch0 mV = %d", result0);
    UART_UartPutString(buffer); NewLine();
buffer[len] = '\0';
        GLCD_WRITE(buffer);

        result1 = ADCmux_GetResult16(1) / 2 ;
    sprintf(buffer, "Ch1 mV = %d", result1);
    UART_UartPutString(buffer); NewLine();
buffer[len] = '\0';
        GLCD_WRITE(buffer);

        result2 = 0.5 * ADCmux_GetResult16(2) / 2 ;
    sprintf(buffer, "Ch2 mV = %d", result2);
    UART_UartPutString(buffer); NewLine();
buffer[len] = '\0';
        GLCD_WRITE(buffer);

        result3 = ADCmux_GetResult16(3) / 2 ;
    sprintf(buffer, "Ch3 mV = %d", result3);
    UART_UartPutString(buffer); NewLine();
buffer[len] = '\0';
        GLCD_WRITE(buffer);

        result4 = ADCmux_GetResult16(4) / 2 ;
    sprintf(buffer, "Ch4 mV = %d", result4);
    UART_UartPutString(buffer); NewLine();
buffer[len] = '\0';
        GLCD_WRITE(buffer);

        result5 = ADCmux_GetResult16(5) / 2 ;
    sprintf(buffer, "Ch5 mV = %d", result5);
    UART_UartPutString(buffer);  NewLine(); NewLine() ;
buffer[len] = '\0';
        GLCD_WRITE(buffer);

        // glcd_test_tiny_text() ;
        CyDelay(5000) ;

    }
}
Pages: [1] 2 3 ... 120