Recent Posts

Pages: 1 2 [3] 4 5 ... 10
21
Project Guidance / Re: Feasability running multip...
Last post by 6v6gt - Today at 09:18 pm
The ballon group at my school is using a plastic bottle to collect atmospheric samples for later testing, rather than attempting to do the analysis during the flight. The students came to the same conclusion - the gas sensors needed too much power.
Where is the fun in that ?
Sending a ballon up to capture an air sample  is not the same as building an Arduino based sensor array which, in real time, collects altitude, pressure, temperature humidity etc., logs it, and returns it to earth for later analysis.
22
Programming Questions / Re: Send the Value of a Potent...
Last post by DS21 - Today at 09:18 pm

Ok, I´m not shure that i got it,  but if so i really need help in defining the currValue and prevValue since I not shure how to make the boxes.
23
Hello,

I've begun playing with arduinos, aiming to build some sensors and as I struggled getting a circuit working, I tried to change the bootloader and other settings by adding a new entry in the boards.txt file.

(taken from this page)
Code: [Select]

lopower.name=Arduino Ultra Low-Power (<2.4V, 8 MHz) w/ ATmega328
 
lopower.upload.protocol=stk500
lopower.upload.maximum_size=30720
lopower.upload.speed=57600
 
lopower.bootloader.low_fuses=0xFF
lopower.bootloader.high_fuses=0xDA
lopower.bootloader.extended_fuses=0x06
lopower.bootloader.path=atmega
lopower.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex
lopower.bootloader.unlock_bits=0x3F
lopower.bootloader.lock_bits=0x0F
 
lopower.build.mcu=atmega328p
lopower.build.f_cpu=8000000L
lopower.build.core=arduino


Alas, burning the bootloader and uploading the sketch with those settings made it stop working. The debug led stopped blinking and the gateway did no longer receive any update.

I reverted to my previous settings (Arduino Nano board), burned bootloader again and uploaded the sketch but althoug the procedure went well, the chip would not work anymore. With another atmega326p-pu chip, the board worked again.

I've runned avrdude to see if I could detect something wrong but nohing obvious emerged (and I'm not competent on that topic either). The ouput is available here : http://ur1.ca/ohh42

Would anyone have a clue about that ? Could the chip be dead and still behave "normaly" with the usbtinyip and avrdude ? is there some way to diagnose it further ?

Regards,

Mikael
24
Hi, Im using ARDUINO UNO, USB Shield, Z-3051 HS Barcode scanner.
Source: https://www.circuitsathome.com/mcu/connecting-barcode-scanner-arduino-usb-host-shield/comment-page-2#comment-25734
USB Host Library: https://github.com/felis/USB_Host_Shield_2.0

we need this for our thesis.. Hopefully someone can help :(
/*
 
Portable barcode scanner. Uses USB HID barcode scanner, Arduino Board, USB Host Shield and HD44780-compatible LCD display
 
  The circuit:
 * LCD RS pin to digital pin 7
 * LCD Enable pin to digital pin 6
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 
*/
 
#include <LiquidCrystal.h>
#include <avr/pgmspace.h>
 
//#include <avrpins.h>
//#include <max3421e.h>
//#include <usbhost.h>
//#include <usb_ch9.h>
#include <Usb.h>
#include <usbhub.h>
#include <avr/pgmspace.h>
//#include <address.h>
#include <hidboot.h>
 
//#include <printhex.h>
//#include <message.h>
//#include <hexdump.h>
//#include <parsetools.h>
 
#define DISPLAY_WIDTH 16
 
// initialize the LCD library with the numbers of the interface pins
//LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
 
USB     Usb;
//USBHub     Hub(&Usb);
HIDBoot<HID_PROTOCOL_KEYBOARD>    Keyboard(&Usb);
 
class KbdRptParser : public KeyboardReportParser
{
 
protected:
  virtual void OnKeyDown  (uint8_t mod, uint8_t key);
  virtual void OnKeyPressed(uint8_t key);
};
 
void KbdRptParser::OnKeyDown(uint8_t mod, uint8_t key)  
{
    uint8_t c = OemToAscii(mod, key);
 
    if (c)
        OnKeyPressed(c);
}
 
/* what to do when symbol arrives */
void KbdRptParser::OnKeyPressed(uint8_t key)  
{
    Serial.println( key );
};
 
KbdRptParser Prs;
 
void setup()
{
    Serial.begin( 115200 );
    Serial.println("Start");
 
    if (Usb.Init() == -1) {
        Serial.println("OSC did not start.");
    }
    delay( 200 );
 
    Keyboard.SetReportParser(0, (HIDReportParser*)&Prs);
    // set up the LCD's number of columns and rows: 
    delay( 200 );
}
 
void loop()
{
  Usb.Task();
}

ERROR: Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno"

te3:44: error: 'HID_PROTOCOL_KEYBOARD' was not declared in this scope

 HIDBoot<HID_PROTOCOL_KEYBOARD>    Keyboard(&Usb);

         ^

te3:44: error: template argument 1 is invalid

 HIDBoot<HID_PROTOCOL_KEYBOARD>    Keyboard(&Usb);

                              ^

te3:44: error: invalid type in declaration before '(' token

 HIDBoot<HID_PROTOCOL_KEYBOARD>    Keyboard(&Usb);

                                           ^

te3:44: error: invalid conversion from 'USB*' to 'int' [-fpermissive]

 HIDBoot<HID_PROTOCOL_KEYBOARD>    Keyboard(&Usb);

                                                ^

C:\Users\THOHIBA\Documents\Arduino\te3\te3.ino: In function 'void setup()':

te3:80: error: request for member 'SetReportParser' in 'Keyboard', which is of non-class type 'int'

     Keyboard.SetReportParser(0, (HIDReportParser*)&Prs);

              ^

exit status 1
'HID_PROTOCOL_KEYBOARD' was not declared in this scope

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
26
Nothing happened. If something happened I wouldn't be posting it.
You would be surprised what gets posted. We are not mind readers.

This program from your Reply #3 works on my Leonardo. Sometimes I find it necessary to upload a program to a Leonardo 2 or 3 times before the upload works.
Code: [Select]

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("Hello world!");
  delay(1000);
}


...R
27
Software / Re: Che c'è di sbagliato in qu...
Last post by gpb01 - Today at 09:14 pm
1. Quando il bottone NON è premuto, hai una resistenza che tiene il pin ad un livello logico ben definito? Perché i pin in INPUT NON vanno MAI lasciati non connessi ...

2. Hai messo la resistenza in serie al LED che hai collegato al pin 3 ?

Guglielmo

@pelletta: ci siamo sovrapposti :D
28
Project Guidance / Re: i2c scanner-is it enough ?
Last post by jremington - Today at 09:14 pm
Yes, you would expect some change in the readings with movement, but change does not indicate proper operation.

Use your head! Proper operation is verified if the device makes sensible measurements of a known magnetic field.
29
Software / Re: Che c'è di sbagliato in qu...
Last post by pelletta - Today at 09:13 pm
Finchè non premi il pulsante il pin di input è flottante perchè non ha una tensione di riferimento.
Quando premi il pulsante invece il pin è collegato a massa quindi segna stato logico basso.
Devi mettere una resistenza di pullup  da 10k tra 5V e pin (riga 51 nella breadboard del disegno) in modo che legge stato logico alto quando il pulsante non è premuto.

30
I built exactly that for my 1987 GM vehicle.  I used this for my voltage divider:



Full write up is here:  Arduino Current Sensor

Basically all you need to do from a hardware perspective is build that two resistor scheme on a small circuit board and splice that one wire going to the oil pressure gauge and bring it into the 12k ohm resistor (on the side that goes to the "+").

If I recall correctly exactly 5K ohm resisters weren't readily available at my nearby shore, I think it was 5.1K or 5.2K I used.  Just get whatever is about +- 1/2 K ohm that you can; the guy that designed that divider built in a bunch of buffer.

I personally don't like splicing wires in my car at arbitrary locations; I prefer being less intrusive incase it needs to be reversed etc.  Depending on what you mean by "old", your instrument cluster may have a cluster connector, something along the lines of this:



I researched the pin functions and then carefully pulled the pins out that I wanted to measure (I did oil pressure, fuel level, left & right signals), soldered a wire on to the back end of the pin, then snapped the pin back into the connector.

Then it's just a matter of writing some code to compare what you get from AnalogRead() to what the gauge shows at very conditions and define a map or divisor to convert volts->reading.

I struggled a lot with Fuel level in my car.  I found that a simple divisor wasn't working because, while "420" is "fuel full", it doesn't drop to zero as a simple percentage.  I ended up writing what I think of as an accelerated decay function to divide by a higher divisor the closer the voltage gets to zero.  A map would work as well in this case.  Oil pressure is pretty close with a simple integer divisor in my car.

Good luck!

Pages: 1 2 [3] 4 5 ... 10

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy