Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - alobo

Pages: [1] 2 3
You'll manage as long as you have minimal programming chops, and I'm sure it'll come back to you quickly! Blynk is insanely easy to use considering just how much you can do with it. Interpreting my heliostat code is where it might get hairy though ... I was looking through it myself and almost couldn't remember what I'd done!

Follow the instructions on the GitHub pages as closely as you can. ESP8266-Arduino here and Blynk here

- be sure to select the correct COM port in the Arduino IDE, and set the programming speed to maximum (921000 baud)
- you'll need to enter an additional source into the Arduino 'boards manager' and install the under-the-hood components that allow you to program the ESP8266 directly.
- Blynk uses hard-coded 'auth token' strings to make sure it communicates with the correct device over the Internet. Keep track of yours, they are generated each time you open a new project in your Blynk phone app.

Start off with the easy Arduino example of 'blink an LED', and then you can move on pretty much immediately to 'blink an LED with Blynk' from the phone app. It's insanely simple - hell, you could even skip the basic Arduino examples entirely and start directly in Blynk using their example code.
In the example below, simply insert your Wifi name/password, and the auth token provided from the Blynk phone app, and upload as-is to the NodeMCU, then plug in a LED to any of the GPIO pins.
Then open your phone app, pull up a 'button' module in the project, assign it to the pin you have the LED connected to ... and press play! You're done - the LED should light up pretty much immediately as you touch the button. Wireless control in under 10 minutes and 10 lines of code! (ignoring the comments and spaces, obviously). They've seriously done some amazing magic behind the scenes of Blynk. (Hell, I should be getting paid for how much I tell people about it!)

Code: [Select]
#include <ESP8266WiFi.h> // can't connect to Wi-Fi without this
#include <BlynkSimpleEsp8266.h> // can't do Blynk magic without this

char auth[] = "YourAuthToken";  // You should get an Auth Token in the Blynk phone app, when you open a new project.

// Your WiFi credentials.
char ssid[] = "insert_wifi_name_here";
char pass[] = "insert_wifi_password_here";

void setup() {
  Blynk.begin(auth, ssid, pass);

void loop() {;

It's great feeling to set up the ESP-12 board from scratch (all you need is 3.3V regulator, capacitor, 3 resistors, 2 switches, and a header for hooking up your FTDI programmer) as compared to building an Arduino board from scratch! You can program it many times faster than the Arduino, too (which is important considering how much program memory it has). I have my IDE set to 921600 baud programming speed, whereas the typical max Arduino upload speed is 115200. And Wi-Fi programming, when it doesn't fizzle, is even faster!

But to speed things up, I will recommend you find a NodeMCU breakout board, these usually come with an ESP-12 already soldered on, with built-in USB/FTDI and regulator. In other words, with a NodeMCU you buy it, plug it in and start programming immediately!
Saves a lot of effort for a minor increase in cost (and you won't have to deal with the 2mm header spacing of the raw ESP-12 module).
However, there can sometimes be minor confusion regarding the 'NodeMCU' pinout vs the 'ESP12' pinout so always have a reference handy like this one.

The NodeMCU was designed as a Lua-based device, but it functions perfectly well in the Arduino IDE! Hell, there's even a version of Python that'll fit on the ESP-12.
... But I digress.

Get yourself a NodeMCU and download the Blynk libraries into Arduino, and I can almost guarantee you that could have your phone talking to the ESP-12 within, like, half an hour (depending on your coding skill). :-)

It's been quite awhile since I've been on this forum! I got busy doing other things, but I did end up working a bit more on my heliostat coding afterward. The idea was to have a single ESP8266 controller for every machine, avoiding the need for long wire runs and messing with I/O expanders. I used A4988 stepper motor controllers but I'm sure almost anything could be used.

It ended up that I got my heliostat to:
- connect to WiFi to get network time,
- assign the target using the Blynk app joystick on my phone, and
- save target coordinates to EEPROM.
(Additionally there is a provision to be able to wirelessly reprogram the board, as long as the total program size is half the size of the internal memory. The ESP-12 modules usually have 4MB of memory, so as long as your program is under 2MB it can be reprogrammed over WiFi!)

I'm uploading my code here pretty much as it was when I last looked at it (over a year ago, so I'm not entirely sure what it looks like ...), and I'd made quite a few modifications without commenting but I hope it's readable. It should compile and run directly on the ESP12 board. Give it a shot and see (modify necessary variables like WiFi name/password, I/O pins etc)

And get familiar with Blynk because it'll really help to add functionality without needing more hardware connections. (Another option is RoboRemo, but I've never used it. Heard good things about it, so keep it in mind if Blynk doesn't work for you.)

It's taken me a while and I haven't been 100% successful, but here is my code for the ESP8266 (ESP-12) WiFi board.

I hope it will be useful to you guys and you can fix what I haven't been able to get working!

Think Tank / Re: Another wireless networking option: ESP8266
« on: November 03, 2015, 11:52:09 PM »
So, I've had a hectic time working on this.
The Sun Tracker compiles and runs on the ESP-12 board, but I was unable to get the EEPROM to save target values. Bummer. I was also unable to get network (NTP) time to work for some reason, although I followed the guide multiple times. Perhaps it could be my WiFi network or my ESP chip, no idea. Others seem to have NTP time working. Perhaps you guys will have better luck. At the moment the time, and the target angle, is manually set in the variables in code at upload/compile time.
There are somewhat significant alterations to the code since I deleted out any code I wasn't using (commented out code actually distracts me, I don't understand why) but the structure of the program is still mostly the same. I've modified it to include the Arduino "Time" library so that once the date/time is set, the program itself keeps time (with low accuracy) as long as it has power. This will be handy if someone gets network time working, since you'd only need to sync-up the clock once a day or so.

Good luck, y'all! Sorry for my delay in uploading my code. Busy days.
Particularly considering that the ESP8266 only has one ADC pin (and which is limited to 1V), I will slowly be working on adding Blynk integration as I have time ... don't depend on me for this, work on it yourselves! I got the basic Blynk programs working pretty fast when I tinkered with it, so I'm pretty sure it should be easy to add to the Sun Tracker program. Which means you'd be able to control and monitor the heliostat from your phone! Let us know what you guys come up with.  :)

My suggestions:

While working with the ESP8266 (which I am really really hooked on right now, in case you can't tell), a couple things came up that I think you will find useful as you upgrade the program.
  • Blynk.
    This thing is effing amazing. I got the ESP8266 and my Android phone talking blinky lights to each other over WiFi pretty goddamn fast. In the case of Arduino (or most other boards they support) you'd need a Wifi or Ethernet module, or have to leave it plugged in to the computer via Serial, to get this working. This will be literally the easiest way to add wireless control and feedback to your heliostat program.
  • The Arduino Time library.
    Assuming you experiment with connecting the program to a network and regularly fetching time from the network (NTP), the Arduino Time library can be used like a clock with or without an RTC. Worth looking into.
I'll put in other things as I come across them.

Think Tank / Re: Another wireless networking option: ESP8266
« on: September 09, 2015, 01:29:42 AM »
I've been super busy but I've made a little progress. I'll post my code once I've cleaned it up significantly - it's a horrible mess.

So if you haven't gone and got yourself an ESP8266 board yet, something's wrong with you.  ;D
There's a lot of choice, but I strongly recommend an ESP-12 or ESP-3 board. Either one is barely an inch square but has all the pins we need. The pin spacing, however, is 2mm rather than the 2.54mm (0.1in) of typical breadboards. You'll need to make an adapter or buy one. Also, probably important: There's only one ADC pin and it only registers 1V max (anything above 1V - up to 3.3v - registers as 100%). Something to be considered.

The ESP8266 can be programmed using the Arduino IDE directly, which is EFFING AMAZING. Unlike the Arduino which has a fixed programming speed (115200 baud) as I recall, the ESP8266 has an auto-adjusting programming mode that automatically adapts to the speed selection in the IDE. It supports up to 921600 baud easily. Programming is done in seconds.


  • Download latest Arduino IDE (1.6.5 as of this post)
  • Open File -> Preferences and look for a box labeled "Additional Boards Manager URLs"
  • In this box, copy/paste the following line: and press OK
  • Open Tools -> Board -> Boards Manager, it will take a sec to download updated information
  • Scroll to the bottom of the boards manager and click "Install" for the ESP8266 option. It will download and install the latest libraries necessary for the ESP8266 platform.
  • Once that is done, open the Tools menu again, and select
    • Board: Generic ESP8266 module
    • Flash mode: QIO
    • Upload speed: 921600
    • Port: (whichever port signifies your USB-Serial converter, just as the Arduino does)
The computer is ready!

Important: You will need a 3.3V power supply capable of up to 1A. Anything less is NOT going to cut it e.g. early model Raspberry Pi or Arduino 3.3V from a USB port. In my case I have a low-dropout regulator connected to a 12V supply.
It will also be very beneficial to use a 3.3V FTDI USB-Serial converter to program the ESP board, however you can get away with using any USB-Serial connection AS LONG AS the levels are converted to 3.3V and all grounds are tied together. The ESP8266 cannot tolerate any 5V connections.

Below is the pin mapping for the ESP-12, assuming it is mounted with the LED and metal enclosure are on top, with the antenna facing away from you.
Code: [Select]
                    ___ESP 12____
3v3 -> 10k -> RESET |           | TX / GPIO1
                ADC |           | RX / GPIO3
3v3 -> 10k -> CH_PD |           | GPIO5
             GPIO16 |           | GPIO4
             GPIO14 |           | GPIO0 <- 10k <- 3v3
             GPIO12 |           | GPIO2 / TXD1
        (RX)/GPIO13 |           | GPIO15/(TX) <- 10k <- GND
                VCC |3v3_____GND| GND
     GND -> SW1 -> RESET     GPIO0 <- SW2 <- GND

If you're worried about following that correctly, here's a proper schematic, and also a step-by-step checklist you can go over. You'll need four 10k resistors, 2 momentary push-button switches, and a capacitor. (Although if you buy a pre-made adapter board, the resistors / switches will likely be already soldered on).
  • VCC --> 3.3V; GND --> GND
  • RESET --> 10k  --> 3.3V
  • GPIO0 --> 10k --> 3.3V
  • CH_PD --> 10k --> 3.3V
  • GPIO15 --> 10k --> GND
  • Switch 1 connected between RESET and GND.
  • Switch 2 connected between GPIO0 and GND.
  • Capacitor between 3.3V and GND. I used a generic 100uF electrolytic capacitor that I had lying around, but even a 100nF will do according to schematics.
Switch 1 obviously is the Reset switch for the chip; Switch 2 is more important as it allows us to enter programming mode. In order to program the chip, GPIO0 must be held LOW during a reset cycle. So one would press both buttons but release the reset switch before releasing the GPIO0 switch.
The capacitor stabilizes power to the board when it sets up its WiFi connection.

Assuming that you have a 3.3V USB-Serial programmer, connect all the ground connections together, and connect its TX and RX pins to the ESP board's RX and TX pins, respectively. I made the mistake myself of connecting the TX and RX pins to each other and wondering why nothing was happening.

This is wrong:
TX --> <-- TX
RX <-- --> RX

This is correct:
TX --> --> RX
RX <-- <-- TX

You are now ready to program the ESP8266 ESP-12 board! (Ideally, anyway.) You can give it a test run by connecting a LED (with resistor) to one of the GPIO pins and uploading the basic Arduino "blink" sketch using that pin number.
To get your Sun Tracker program working on the ESP8266, these are the steps I took, starting with the untouched Mega version of the program.
  • remove all references to the BigNumber library and replace the SunCalculations with the code you provided earlier in this thread.
  • remove any and all code referencing the MCP23017 I/O expander and the Wire library. The Wire library has been ported to the ESP, so it works, but we don't need it assuming one ESP8266 board per machine.
  • invert the LOW/HIGH functionality of all of the digital inputs throughout the program. The ESP8266 IO pins have internal pull-up resistors, so I activated them on the input pins, meaning that I wouldn't need to connect external resistors for any switches / buttons. This also means that all digital inputs would have their behaviour inverted - triggering LOW instead of HIGH - and all switches would need to connect to ground. So this involved 2 steps:
    • replace all occurrences of "pinMode(pin, INPUT)" with "pinMode(pin, INPUT_PULLUP)"
    • replace all occurrences of "digitalRead(pin) == HIGH" with "digitalRead(pin) == LOW" and vice versa
  • change all the pin numbers to reflect new pin assignments that match the ESP-12 board.
  • remove all code referencing the RTC and plugging in constant values until network time can be achieved.
  • insert this line: yield(); into the bottom of the function delayInMicroSeconds located in the Functions.ino file.
Useful tip: in cases of error, the ESP8266 typically defaults to a Serial output speed of 115200 baud. So, it is useful to change the program baud rate from Serial.begin(9600); to Serial.begin(115200); so there's no chance of missing any error messages.
At this point, the code should compile and upload comfortably to the ESP board.

The EEPROM code needs to be modified, however. I have made the modifications noted on the ESP8266 Arduino Github page, but the device refuses to save anything to EEPROM. Decidedly weird. And if it doesn't save to EEPROM the program loses a lot of its worth since you'd have to redirect the machine every time it loses power.

Think Tank / Re: Another wireless networking option: ESP8266
« on: August 12, 2015, 06:17:02 PM »
From the ESP8266 Arduino Github reference:

Remember that there is a lot of code that needs to run on the chip besides the sketch when WiFi is connected. WiFi and TCP/IP libraries get a chance to handle any pending events each time the loop() function completes, OR when delay is called. If you have a loop somewhere in your sketch that takes a lot of time (>50ms) without calling delay, you might consider adding a call to delay function to keep the WiFi stack running smoothly.

There is also a yield() function which is equivalent to delay(0). The delayMicroseconds function, on the other hand, does not yield to other tasks, so using it for delays more than 20 milliseconds is not recommended.

I didn't replace your custom delayInMicroseconds function (although that was my first idea). I only added the delay(0) into the end of it. No doubt it might cause a tiny slowing of the stepping code, but that's preferable to the program continually crashing lol

As for the trig accuracy, I'll see what I can find. The NOAA calculations and the ESP8266 values are not as close as I would expect - but that may be due to differences in the algorithm, perhaps, as opposed to precision? Let's see what comes up.

Think Tank / Re: Another wireless networking option: ESP8266
« on: August 11, 2015, 02:04:14 AM »
Thanks Gabriel, your Processing sun tracking code worked! I'm still not entirely sure of its accuracy, though. I used the NOAA Solar Position Calculator to see, but it only reports the values to 2 decimal places.

I used these settings for both the online calculator and your program:
Latitude: 15.4989
Longitude: 73.8278
Timezone: +5 (It's actually 5.5 but I don't know if the calculations in your program account for that)
Time: 13:00:00 on Aug 1 2015
UseNorthAsZero = TRUE

Azimuth: 284.06 clockwise from North
Altitude: 78.01 above the horizon
Arduino code
Azimuth: 121.194
Altitude: 84.792

I don't see why the ESP8266 would use lookup tables to calculate when it's rather more powerful than an Arduino Mega - but it may be worth checking.
... Uh, how do I check that?  ;D

Long story short: I took out the BigNumber and Wire libraries, replaced the Sun Calculations with the Processing code you sent. Couple of small adjustments to the EEPROM read/write code, but otherwise unchanged. Changed pin numbers to correspond to appropriate ESP pins.
Basically, totally plagiarized every part of your program. But it runs on the ESP, compiled using the latest Arduino IDE 1.6.5! I'm using a ESP-12E board.

My major snag right now is, the MoveMachine code. I haven't yet connected any other circuitry - I just want it to compile and run through fully first. It seems that the ESP8266 accepts the code and runs through it relatively fine, up to the point where it moves the steppers. Specifically, in Functions.ino, at the function moveMotorWithAccel. There's a loop there that controls the acceleration of the steppers. It actually goes through that loop up to the point where it's supposed to reset the motors, and crashes throwing up a stack trace full of hex values which I have no idea how to interpret.
But, funny story: I threw in a few debug lines into the loop to see exactly at what point it was crashing, and it DIDN'T crash! No doubt the Serial output introduces a significant delay in the motor-stepping code, but why would the crashing happen at all, in that case, I wonder. What do you think?

I narrowed it down to the delayInMicroseconds, more or less. Without the debug code in the motor-stepping code, it kept crashing. So, I inserted a teensy little delay(0); into your delay function. Worked like a charm ... I hope. Now over the next couple of days I'll wire up my stepper drivers and see how well it tracks.

I also added a subroutine to connect to my WiFi and request time from an NTP server (plagiarized from one of the Arduino/ESP8266 example sketches). It connects to WiFi in just about 2 seconds - but it seems to have difficulty connecting to the Internet even though my computers on the same network have no issue. Oh well. I'll keep you posted as I figure it out.

Think Tank / Re: Another wireless networking option: ESP8266
« on: August 01, 2015, 03:17:04 AM »
I tried that code snippet you posted, and the serial output:

double test = 123.456789123456789;
Serial.println(test, 20);

Serial output:

I presume that is good .... but I still don't want to have to rewrite all the sun calculations  ;D

I found that the BigNumber library compiles, and throws a few errors:

Code: [Select]
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:43:0:
/root/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//include/c_types.h:80:0: warning: "TRUE" redefined [enabled by default]
 #define TRUE            true
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:39:0:
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.h:84:0: note: this is the location of the previous definition
 #define TRUE 1
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:43:0:
/root/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//include/c_types.h:81:0: warning: "FALSE" redefined [enabled by default]
 #define FALSE           false
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:39:0:
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.h:85:0: note: this is the location of the previous definition
 #define FALSE 0
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c: In function 'bc_str2num':
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:1524:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
   ptr = str;
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:1549:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
   ptr = str;
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:43:0:
/root/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//include/c_types.h:80:0: warning: "TRUE" redefined [enabled by default]
 #define TRUE            true
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:39:0:
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.h:84:0: note: this is the location of the previous definition
 #define TRUE 1
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:43:0:
/root/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/tools/sdk//include/c_types.h:81:0: warning: "FALSE" redefined [enabled by default]
 #define FALSE           false
In file included from /home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:39:0:
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.h:85:0: note: this is the location of the previous definition
 #define FALSE 0
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c: In function 'bc_str2num':
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:1524:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
   ptr = str;
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:1549:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
   ptr = str;

I wrote an empty sketch, and only included the BigNumber and BigNumberMath libraries.
It seems the problem lies in your "BigNumberMath" library. The code below compiles and uploads just fine:

Code: [Select]
#include <BigNumber.h>
#include <BigNumberMath.h>

void setup(){

void loop(){
DEBUGLN("loop", millis())

but, the ESP8266 does nothing after that, and if I reset it, goes into a loop outputting this error:

Code: [Select]
ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1264, room 16
tail 0
chksum 0x42
csum 0x42

This error goes away if I comment out the BigNumberMath library.

I'll continue to ask on the ESP8266 forums, though. They may be able to help resolve this .... or else I may just have to rewrite the sun calculations.

If I have to rewrite it, how should I go about it? Is it as simple as replacing every instance of "BigNumber" with "double" and correcting the number syntax?

Think Tank / Re: Another wireless networking option: ESP8266
« on: July 29, 2015, 09:41:43 PM »
ESP8266 user martinayotte modified the BigNumber library to compile directly for the ESP8266 in the Arduino IDE (see the forum post). So this saves me from having to rewrite the equations (I'm afraid of messing up the variables and calculations, hahah). Perhaps it can be rewritten later to reduce the memory footprint of BigNumber, but for now it should work.  ;D

I've attached the modified library below for your perusal. The SunCalculations code compiles without a problem. I unfortunately seem to have damaged my ESP8266 and it's not responding. Waiting for a new one(s) to test the output.

I think some modifications need to be made to use the EEPROM library correctly with ESP8266 - both in terms of calling functions, and the EEPROM size: 512 bytes, as opposed to 1kB on the Uno and 4kB on the Mega.
There is a RTC library to control DS1307 and DS3231 RTC chips ... you may find it promising to go over the latest documentation for using the ESP8266 with the Arduino IDE, here. Almost all of the basic code is now interchangeable between Arduinos and ESP8266.

I've posted another question on the ESP8266 forums about getting access to the ESP8266's internal RTC via the Arduino IDE. If that can be achieved (and is accurate enough), then you can get rid of the external RTC, and all that needs to be added is a subroutine to regularly connect to WiFi and update ... and, done!

Think Tank / Re: Another wireless networking option: ESP8266
« on: July 24, 2015, 10:12:45 PM »
So I've started on this. I think the biggest obstacle is the BigNumber library; it doesn't compile directly for the ESP8266 and I'm not sure how to fix that. Apart from that, all I'd do is copy your code mostly verbatim (but ignoring the subroutines for multiple machine control). I'd have to adapt EEPROM and RTC codes and such for the ESP8266, but that seems to be relatively straightforward (at least according to the Github page).

I included the BigNumber library in an empty Arduino sketch configured for the ESP8266 (image attached), and compiling failed - I've attached the compiler output in a text file. The warnings / errors that show up are:

Code: [Select]
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c: In function 'bc_str2num':
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:1523:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
   ptr = str;
/home/works/Downloads/arduino-1.6.5/libraries/BigNumber/number.c:1548:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
   ptr = str;

Code: [Select]
/root/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/xtensa-lx106-elf-gcc -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -L/root/.arduino15/packages/esp8266/hardware/esp8266/1.6.4-673-g8cd3697/tools/sdk//lib -L/root/.arduino15/packages/esp8266/hardware/esp8266/1.6.4-673-g8cd3697/tools/sdk//ld -Teagle.flash.512k.ld -o /tmp/build4714199143779152163.tmp/sketch_jul25a.cpp.elf -Wl,--start-group /tmp/build4714199143779152163.tmp/sketch_jul25a.cpp.o /tmp/build4714199143779152163.tmp/BigNumber/number.c.o /tmp/build4714199143779152163.tmp/BigNumber/BigNumber.cpp.o /tmp/build4714199143779152163.tmp/BigNumberMath/BigNumberMath.cpp.o /tmp/build4714199143779152163.tmp/core.a -lm -lgcc -lhal -lphy -lnet80211 -llwip -lwpa -lmain -lpp -lsmartconfig -Wl,--end-group -L/tmp/build4714199143779152163.tmp
/root/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: /tmp/build4714199143779152163.tmp/sketch_jul25a.cpp.elf section `.text' will not fit in region `iram1_0_seg'
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o: In function `_bc_do_compare$part$0$constprop$5':
number.c:(.text+0x230): undefined reference to `exit'
number.c:(.text+0x24b): undefined reference to `exit'
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o: In function `new_sub_num$constprop$3':
number.c:(.text+0x288): undefined reference to `exit'
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o: In function `bc_divide':
number.c:(.text+0xcb8): undefined reference to `exit'
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o: In function `bc_raisemod':
number.c:(.text+0x1138): undefined reference to `exit'
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o:number.c:(.text+0x1433): more undefined references to `exit' follow
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o: In function `bc_sqrt':
number.c:(.text+0x14a0): undefined reference to `__ctype_ptr__'
/tmp/build4714199143779152163.tmp/BigNumber/number.c.o: In function `bc_str2num':
number.c:(.text+0x15fc): undefined reference to `exit'
collect2: error: ld returned 1 exit status
Error compiling.

Perhaps the warnings can be ignored, but from what I've been able to Google, the 'undefined reference' errors are related to some library not being included? I'm not sure how to pinpoint it.

EDIT: I've posted on the ESP8266 forums. Hopefully there'll be interest in this. The ESP8266 board could be configured to regularly get time updates over WiFi (my DS1307 RTC unfortunately drifts over a minute per week).

Heliostat Projects / Re: Reflection drift in late afternoon/evening
« on: July 17, 2015, 09:20:52 PM »
So we finally had a few days of somewhat reliable sun. It seems the reflection drifting was because of a combination of
1) incorrect north-south alignment, and
2) the altitude motor missing steps.

If the sun comes out some more I'll try it with a fresh motor and double-checked wiring.

None of the nearby buildings are in line with any cardinal directions. I used a nearby landmark that looked to be in the right place on Google Maps but it seems it was nearly 5 degrees off. Using the direction-sensor on my smartphone only gives me accuracy to within one degree. That was the issue I faced, anyway, I'm sure others have their own workarounds/solutions. I finally used what I should have done at first, and measured the shortest shadow of the day on a pole, and lined up with that. (luckily the sun was out long enough to measure the shadow).

Think Tank / Re: Oh, deployable things.
« on: June 22, 2015, 12:22:07 AM »
Hey Paul, if you're keeping track of this thread at all, take a look at my recent thread about the ESP8266 WiFi module. You may find it interesting.

Think Tank / Re: Another wireless networking option: ESP8266
« on: June 21, 2015, 09:26:53 PM »
A friend of mine suggested via Facebook, that the processor built into the ESP8266 can be programmed via the Arduino IDE. I'm looking now for the most up-to-date guide if there is one. EDIT: This looks like it.

Apparently it's a 32-bit processor with a fair bit of memory. According to Hackaday, "The processor by default runs at 80 MHz but can go up to 160 MHz, it has ~80kB DRAM (Data RAM), and ~35kB of high speed IRAM (Instruction RAM)." The chip itself has 16 GPIO pins, of which 10 are made available with the ESP-12 breakout board.

And my friend on Facebook quite temptingly noted: A Mega from Adafruit costs $45 and has 54 I/O with its 16MHzCPU and 256kB RAM; an ESP-12 board can go as low as $3 with 10 GPIO and its faster processor, so 6 of them would give you 60 GPIO, with every 10 pins having its own high-speed processor and more total RAM, for less than $20.

This is giving me ideas, considering the A4988 stepper driver chip is 3.3V compatible ... But for all I know might require a significant redevelopment of your tracker code, hahah. I'm not a very good programmer, but I just might give it a shot anyway just because why the hell not. ;D

Pages: [1] 2 3