
superbrew
Members-
Content Count
37 -
Joined
-
Last visited
About superbrew
-
Rank
Advanced Member
-
I just received my CC3100 booster and I am having some trouble with it. I am not familiar with the networking stuff, so I am not sure where the problem lies. I have been able to get the web server example working, where I can turn the LP LED on and off through the browser. I am also able to get the NTP time example working. When I try to run the weather example, I get an error value of -161 (No DNS specified) when I get to the GetHostIP function. What is causing this? The code I am using is the getweather from the CC3100 examples. I have not modified anything except my network settings in
-
Hi, I am able to get the testDHCP example working, but on others I get the following error: In function `abort': abort.c:(.text.abort+0xa): undefined reference to `_exit' collect2.exe: error: ld returned 1 exit status How do I fix that? I have tried different versions of Energia, I have replaced the 'cores' lm4f library, I have replaced spi.cpp and spi.h. EDIT: I figured it out, there is a commented section in startup_gcc.c __attribute__((weak)) extern void _exit (void) { } I uncommented and it is working fine now.
-
Hello, I am trying to read a pulse that is 1-2ms wide and has a PRI of 20ms. This code is producing a value of ~30000 (1.5mS). No matter what I change the prescale value to, the count is always the same. My understanding from the data sheet is that the prescaler only works when the timer is in half width mode, which I assume it is due to configuring it as a split pair. Is this assumption correct? #include <stdint.h> #include <stdio.h> #include <stdbool.h> #include <math.h> #include <string.h> #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "inc/h
-
So, there is a problem with my code above. After some time, the number of particles visible on the screen reduced to zero. I didn't notice at first because I had 100 particles. I am still learning C, so ti was not obvious to me what was going on at first. Here is some code that works, for real this time Now, I need to figure out how to make the animation smoother. I am clearing the screen between each update, which causes it to flicker. void EvolveParticle() { int i = 0; for(i=0;i < MAXPARTICLE; i++) { // evolve the particle parameters particle[i].lifetime -= particle[i].decay
-
Hi pabigot, thanks for your help. I changed the loop bound as you suggested and it had no effect on the code. Then I just replaced the function call with the code that was inside of the function call and it worked. I am not sure why that works, but it does. With that code above, I have a continuous stream of particles flowing from the bottom of my LCD.
-
Ok, so this does what I want, but I don't know why. I also made the particles a little bigger. void EvolveParticle() { int i = 0; for(i=0;i < MAXPARTICLE; i++) { // evolve the particle parameters particle[i].lifetime -= particle[i].decay; if(particle[i].lifetime == 0)particle[i].active = false; if(particle[i].xPos >= 0 || particle[i].xPos <= getScreenWidth()) particle[i].xPos += particle[i].xSpeed; if(particle[i].yPos >= 0 || particle[i].yPos <= getScreenHeight()) particle[i].yPos += particle[i].ySpeed; particle[i].ySpeed -= 1; setColor(particle[i].color);
-
Hello, I am trying to get a simple particle system working on an LCD screen. I am running into trouble when trying to modify my array particle structs. If I rewrite the whole array, it works, but if I try to modify one element of the array, I fall into the fault ISR. Here is the nonworking code: #include <stdbool.h> #include <stdlib.h> #include "particle.h" #include "graphics.h" #include "lcd.h" int MAXPARTICLE = 20; PARTICLE particle[MAXPARTICLE]; void CreateParticle(int i) { particle[i].lifetime= 1 + rand()%20; particle[i].decay=1; particle[i].color = 0xffffff;
-
I have made some updates to this project. I have limited the colors to 3, so that I can 'win' once in a while. Once I figure out to calculate odds and probabilities a little better, I will add some more colors. I also used one of the on board switches to initiate a spin.
-
Not sure if this would help, but I use this firmware on my quadcopter, and I would say the yaw is stable on that. The board I am using in my quad uses an MPU6050 for the accel/gyro. Maybe digging through this will give you some ideas https://github.com/MegaPirateNG
-
Here is the function I use to collect the data: uint32_t newTicks; float MotionMain(uint32_t ticks) { float gX, gY, gZ, aX, aY, aZ; float gyro_angle_x; static float oldAngle; volatile float dt; float alpha = 0.90; MPU6050DataRead(&g_sMPU6050Inst, MotionCallback, &g_sMPU6050Inst); MotionI2CWait(__FILE__, __LINE__); MPU6050DataGyroGetFloat(&g_sMPU6050Inst, &gX, &gY, &gZ); MPU6050DataAccelGetFloat(&g_sMPU6050Inst, &aX, &aY, &aZ); aX = ((atanf(aY/sqrtf(pow(aX,2)+pow(aZ,2))))*57.296) - g_faoffsetX; dt = (float)ticks/1000; gyro_angle_x = ol
-
I have started to develop a slot machine based an 8x8 RGB matrix. I intend this to be a learning experience, and I am going to focus on the logic and control of the game. Hardware: Tiva C Launchpad TLC5947 breakout from Adafruit 8 PNP transistors 8 1k resistors As of right now, I have 2x2 sprites in 6 colors representing the symbols on the reels. Each 'spin', I populate an array representing the matrix with randomly chosen colors of sprites and place them in the matrix. Then I set a random number of rotations where the symbols spin and then slow down and come a stop. As of right now,