Search found 12 matches

by rgsparber
Wed Feb 14, 2018 7:38 pm
Forum: Projects
Topic: Debugging Code on an Arduino ATTiny85
Replies: 1
Views: 37

Debugging Code on an Arduino ATTiny85

I really enjoy playing with devices that are tiny, intricate, and low in cost. The ATTiny85 certainly fits that description. It is an entire computer system that easily rests on a fingernail and can be bought for under $1.50. So what's not to like? Well, with the tiny package comes a tiny number of ...
by rgsparber
Fri Dec 29, 2017 6:56 am
Forum: Projects
Topic: Arduino based Irrigation Flow Monitor and Control System
Replies: 0
Views: 126

Arduino based Irrigation Flow Monitor and Control System

I'm using a Pro Micro to run an irrigation flow system. It monitors the flow on each zone of my home irrigation system and alarms when the flow is off by more than 30%. It took me over 9 months to develop and document the project which I now freely give away. My hope is that someone else will bring ...
by rgsparber
Sun Jul 30, 2017 4:29 pm
Forum: Arduino
Topic: Programming Style
Replies: 2
Views: 369

Re: Programming Style

Perfect quote!

Rick
by rgsparber
Thu Jul 27, 2017 4:27 pm
Forum: Arduino
Topic: Programming Style
Replies: 2
Views: 369

Programming Style

I have sifted through a lot of code this summer as I tried to debug my project. In most cases the code was cryptically commented. In some cases there were no comments at all or silly ones like A = B; //A equals B. In many cases programmers had done clever things including playing at the bit level to...
by rgsparber
Sun Jul 23, 2017 6:40 am
Forum: Arduino
Topic: Phantom File
Replies: 0
Views: 231

Phantom File

I compiled my program and saw: Multiple libraries were found for "Adafruit_MCP23017.h" Used: C:\Users\Owner\Arduino\arduinosketchfolder\libraries\Adafruit_MCP23017 Not used: C:\Program Files (x86)\Arduino\libraries\Adafruit-MCP23017 But when I go to C:\Program Files (x86)\Arduino\libraries there is ...
by rgsparber
Sun Jul 23, 2017 6:36 am
Forum: Arduino
Topic: I2C on Pro Micro
Replies: 5
Views: 857

Re: I2C on Pro Micro

I found the root cause of my problem: The "Wire" folder existed in Program Files (x86)/Arduino/libraries and also in my sketchbook/libraries. No error messages generated during compilation. I removed the copy in my sketchbook and now button runs as expected.

Rick
by rgsparber
Tue Jul 18, 2017 7:42 am
Forum: Arduino
Topic: I2C on Pro Micro
Replies: 5
Views: 857

Re: I2C on Pro Micro

In looking at the spec sheet, I can see that given a prescaller value of 1 (both bits = 0), a TWBR of 18 decimal should generate a SCL of 100 KHz. In twi.c there are two places TWBR is set. I commented out both lines and replace them with TWBR = 0x12 without the ";". The compiler found the error whi...
by rgsparber
Sun Jul 16, 2017 8:42 am
Forum: Arduino
Topic: I2C on Pro Micro
Replies: 5
Views: 857

Re: I2C on Pro Micro

I see that the serial clock out of the Pro Micro is 1 MHz and the highest frequency "mode" of the MCP23017 is 1.7 MHz. There is a note that says the SCL should be at least 16 times slower than the slave. I played with TWBR prescalers but could not change the SCL frequency. This was done within twi.c...
by rgsparber
Sat Jul 15, 2017 5:42 pm
Forum: Arduino
Topic: I2C on Pro Micro
Replies: 5
Views: 857

I2C on Pro Micro

I have a Pro Micro 5V/16 Mhz and want to use the I2C. What libraries should I include? I tried Wire and HardWire but neither of them turn on the weak pull up resistors which tells me they are not compatible. When I add external 1K resistors, I see clock and data activity. I was getting the correct a...
by rgsparber
Fri Jul 07, 2017 11:01 am
Forum: SparkFun Product Questions
Topic: LCD-00791 software driver problem
Replies: 6
Views: 663

Re: LCD-00791 software driver problem

I did not update my library AFAIK. Are you sure the overseas site has the same hardware configuration? A broken wire or misplaced wire can cause strange results. It is not unheard of that around the time of a software update, a wire breaks. I suggest you go back to basics and assume that it never wo...
by rgsparber
Wed Jul 05, 2017 12:21 pm
Forum: SparkFun Product Questions
Topic: LCD-00791 software driver problem
Replies: 6
Views: 663

Re: LCD-00791 software driver problem

I doubt this is the right way to do it, but I modified LiquidCrystal.h at line 75 from begin(16,1); which says 16 columns and 1 row to begin(16,2); which says 16 columns 2 rows. Display now works as expected. It is not at all clear why I had to do this.

Rick
by rgsparber
Tue Jul 04, 2017 4:43 pm
Forum: SparkFun Product Questions
Topic: LCD-00791 software driver problem
Replies: 6
Views: 663

LCD-00791 software driver problem

I bought an LCD-00791 16X2 display and it worked fine in 2015. I just wrote some new code that uses this display and find that I can't move to the second row. Anything that is printed appears on the first row. "lcd.setCursor(0,1);" has no effect. I do have lcd.begin(16,2); in my setup(). I'm driving...